~afb/smart/looporder

« back to all changes in this revision

Viewing changes to test

  • Committer: Anders F Bjorklund
  • Date: 2009-03-03 07:43:25 UTC
  • mfrom: (844.1.9 trunk)
  • Revision ID: afb@users.sourceforge.net-20090303074325-ssrae5m9ut1lvp04
merge changes from trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
import os
29
29
 
30
30
from smart.option import OptionParser
31
 
from smart import init, const, interface
 
31
from smart import init, const, interface, iface
32
32
from smart import *
33
33
 
34
34
import tests
89
89
 
90
90
    try:
91
91
        const.DISTROFILE = "/non-existent/file"
92
 
        interface.getScreenWidth = lambda: 80
93
92
 
94
93
        tests.ctrl = init(datadir=datadir)
95
94
        opts = parse_options(sys.argv[1:])
96
95
 
 
96
        # Let's use an interface which doesn't output progress.
 
97
        iface.object = interface.Interface(tests.ctrl)
 
98
 
97
99
        runner = unittest.TextTestRunner()
98
100
        loader = unittest.TestLoader()
99
101
        doctest_flags = doctest.ELLIPSIS
124
126
 
125
127
                shutil.rmtree(datadir)
126
128
                os.mkdir(datadir)
 
129
                from smart import sysconf
 
130
                if sysconf.get("channels"):
 
131
                    print "GOT CHANNELS:", sysconf.get("channels")
127
132
 
128
133
        if doctests:
129
134
            print "Running doctests..."