50 |
warnings.filterwarnings("error", "The Layer attribute.*is deprecated", |
warnings.filterwarnings("error", "The Layer attribute.*is deprecated", |
51 |
DeprecationWarning) |
DeprecationWarning) |
52 |
|
|
|
# Usage of the old table interface. This old interface is still used |
|
|
# by the test_table.py module which calls filterwarnings too to |
|
|
# ignore the warnings issued by its own intended use of the old |
|
|
# interface. |
|
|
warnings.filterwarnings("error", ".*old table interface.*", |
|
|
DeprecationWarning) |
|
|
|
|
53 |
verbosity = 1 |
verbosity = 1 |
54 |
|
|
55 |
opts, args = getopt.getopt(sys.argv[1:], 'v', ['verbose']) |
opts, args = getopt.getopt(sys.argv[1:], 'v', ['verbose']) |
64 |
# FIXME: It should be possible to run runtests.py even when not in |
# FIXME: It should be possible to run runtests.py even when not in |
65 |
# the test directory |
# the test directory |
66 |
files = os.listdir(os.curdir) |
files = os.listdir(os.curdir) |
67 |
names = [] |
if args: |
68 |
for file in files: |
names = args |
69 |
if file[:4] == "test" and file[-3:] == ".py": |
else: |
70 |
names.append(file[:-3]) |
names = [] |
71 |
|
for file in files: |
72 |
|
if file[:4] == "test" and file[-3:] == ".py": |
73 |
|
names.append(file[:-3]) |
74 |
|
|
75 |
suite = unittest.defaultTestLoader.loadTestsFromNames(names) |
suite = unittest.defaultTestLoader.loadTestsFromNames(names) |
76 |
runner = support.ThubanTestRunner(verbosity = verbosity) |
runner = support.ThubanTestRunner(verbosity = verbosity) |