| 1 | #!/usr/bin/env python |
| 2 | |
| 3 | import os |
| 4 | import re |
| 5 | import sys |
| 6 | import Tkinter |
| 7 | |
| 8 | import Test |
| 9 | Test.initialise() |
| 10 | |
| 11 | # Uncomment these to modify period between tests and how much output |
| 12 | # to print: |
| 13 | #Test.setdelay(1000) |
| 14 | #Test.setverbose(1) |
| 15 | |
| 16 | # Ignore Tkinter test since it does not test any Pmw functionality |
| 17 | # (only Tkinter) and it fails under MS-Windows 95 (and it hasn't been |
| 18 | # kept up-to-date with changes to Tk. |
| 19 | ignoreTests = ('Tkinter_test.py',) |
| 20 | |
| 21 | # Also ignore Blt test since it causes Blt 2.4z to core dump. |
| 22 | if Tkinter.TkVersion >= 8.4: |
| 23 | ignoreTests = ignoreTests + ('Blt_test.py',) |
| 24 | |
| 25 | allTestData = () |
| 26 | files = os.listdir(os.curdir) |
| 27 | files.sort() |
| 28 | |
| 29 | for file in files: |
| 30 | if file not in ignoreTests and re.search('^.+_test.py$', file) is not None: |
| 31 | test = file[:-3] |
| 32 | exec 'import ' + test |
| 33 | exec 'allTestData = allTestData + ' + test + '.testData' |
| 34 | |
| 35 | Test.runTests(allTestData) |