File: All.py

package info (click to toggle)
python-pmw 1.2-3
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 2,024 kB
  • ctags: 3,802
  • sloc: python: 17,143; makefile: 41
file content (35 lines) | stat: -rwxr-xr-x 863 bytes parent folder | download | duplicates (5)
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
30
31
32
33
34
35
#!/usr/bin/env python

import os
import re
import sys
import Tkinter

import Test
Test.initialise()

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

# Ignore Tkinter test since it does not test any Pmw functionality
# (only Tkinter) and it fails under MS-Windows 95 (and it hasn't been
# kept up-to-date with changes to Tk.
ignoreTests = ('Tkinter_test.py',)

# Also ignore Blt test since it causes Blt 2.4z to core dump.
if Tkinter.TkVersion >= 8.4:
    ignoreTests = ignoreTests + ('Blt_test.py',)

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

for file in files:
    if file not in ignoreTests and re.search('^.+_test.py$', file) is not None:
	test = file[:-3]
	exec 'import ' + test
	exec 'allTestData = allTestData + ' + test + '.testData'

Test.runTests(allTestData)