File: All.py

package info (click to toggle)
python-pmw 0.6.2-0.1
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 1,652 kB
  • ctags: 2,716
  • sloc: python: 10,720; makefile: 44; sh: 24
file content (26 lines) | stat: -rw-r--r-- 512 bytes parent folder | download
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
# Invoke all tests in this directory.
#   Usage: python testall.py

import os
import regex
import sys

import Test
Test.initialise()

# Uncomment these to modify period between tests and how much output
# to print:
#Test.setdelay(1000)
#Test.setverbose(1)

allTestData = ()
files = os.listdir(os.curdir)
files.sort()

for file in files:
    if regex.search('^.+_test.py$', file) == 0:
	test = file[:-3]
	exec 'import ' + test
	exec 'allTestData = allTestData + ' + test + '.testData'

Test.runTests(allTestData)