|
Revision 162, 0.5 KB
(checked in by mg, 6 years ago)
|
|
Move all modules into a package (pyspacewar), which resides inside a src/
subdirectory (to avoid clashes with the pyspacewar script).
Now python setup.py bdist seems to work (there are extra files in the
tarball, but I think that's because I was afraid to run setup.py clean
without checking everything in).
The setup script now requires python 2.4 (for package_data).
|
-
Property svn:executable set to
*
-
Property svn:keywords set to
Id
|
| Line | |
|---|
| 1 | #!/usr/bin/env python |
|---|
| 2 | """ |
|---|
| 3 | Run all unit tests. |
|---|
| 4 | """ |
|---|
| 5 | |
|---|
| 6 | import unittest |
|---|
| 7 | import glob |
|---|
| 8 | import sys |
|---|
| 9 | import os |
|---|
| 10 | |
|---|
| 11 | |
|---|
| 12 | def main(): |
|---|
| 13 | sys.path.insert(0, 'src') |
|---|
| 14 | suite = unittest.TestSuite() |
|---|
| 15 | for filename in glob.glob('src/pyspacewar/tests/test_*.py'): |
|---|
| 16 | name = os.path.basename(filename)[:-3] |
|---|
| 17 | module = __import__('pyspacewar.tests.' + name, {}, {}, ('',)) |
|---|
| 18 | suite.addTest(module.test_suite()) |
|---|
| 19 | runner = unittest.TextTestRunner(verbosity=1) |
|---|
| 20 | runner.run(suite) |
|---|
| 21 | |
|---|
| 22 | |
|---|
| 23 | if __name__ == '__main__': |
|---|
| 24 | main() |
|---|