File: testrunner.py

package info (click to toggle)
grilo 0.3.19-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,220 kB
  • sloc: ansic: 19,097; xml: 2,261; python: 714; makefile: 18
file content (29 lines) | stat: -rwxr-xr-x 542 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/usr/bin/env python

import unittest
import glob
import sys

# https://bugzilla.gnome.org/show_bug.cgi?id=748455
exit (0)

test_loader = unittest.defaultTestLoader

names = []
args = sys.argv[1:]

if args:
    for item in args:
        names.append(item[:-3])
else:
    for filename in glob.iglob("test_*.py"):
        names.append(filename[:-3])

test_suites = []
for name in names:
    test_suites.append(test_loader.loadTestsFromName(name))

runner = unittest.TextTestRunner(verbosity=2)

for suite in test_suites:
    runner.run(suite)