~ubuntu-branches/ubuntu/lucid/pitivi/lucid

« back to all changes in this revision

Viewing changes to tests/runtests.py

  • Committer: Bazaar Package Importer
  • Author(s): Sebastian Dröge
  • Date: 2009-05-27 14:22:49 UTC
  • mfrom: (1.2.1 upstream) (3.1.13 experimental)
  • Revision ID: james.westby@ubuntu.com-20090527142249-tj0qnkc37320ylml
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
    if not which:
10
10
        dir = os.path.split(os.path.abspath(__file__))[0]
11
11
        which = [os.path.basename(p) for p in glob.glob('%s/test_*.py' % dir)]
12
 
    
 
12
 
13
13
    names = map(lambda x: x[:-3], which)
14
14
    for f in SKIP_FILES:
15
15
        if f in names:
16
16
            names.remove(f)
17
17
    return names
18
 
        
 
18
 
19
19
suite = unittest.TestSuite()
20
20
loader = unittest.TestLoader()
21
21
 
22
22
for name in gettestnames(sys.argv[1:]):
23
23
    suite.addTest(loader.loadTestsFromName(name))
24
 
    
 
24
 
25
25
descriptions = 1
26
26
verbosity = 1
27
27
if os.environ.has_key('VERBOSE'):
28
28
    descriptions = 2
29
29
    verbosity = 2
 
30
from pitivi.log import log
 
31
log.init('PITIVI_DEBUG', 1)
30
32
 
31
33
testRunner = unittest.TextTestRunner(descriptions=descriptions,
32
34
    verbosity=verbosity)