| 1 |
#!/usr/bin/python3 |
| 2 |
|
| 3 |
import sys |
| 4 |
import os |
| 5 |
sys.path.append(os.path.realpath(".")) |
| 6 |
|
| 7 |
import unittest |
| 8 |
|
| 9 |
import cleanstream |
| 10 |
import tagger |
| 11 |
import pretransfer |
| 12 |
import transfer |
| 13 |
import interchunk |
| 14 |
import postchunk |
| 15 |
import adaptdocx |
| 16 |
import capitalization |
| 17 |
|
| 18 |
if __name__ == "__main__": |
| 19 |
os.chdir(os.path.dirname(__file__)) |
| 20 |
failures = 0 |
| 21 |
for module in [tagger, |
| 22 |
pretransfer, |
| 23 |
transfer, |
| 24 |
interchunk, |
| 25 |
postchunk, |
| 26 |
adaptdocx, |
| 27 |
cleanstream, |
| 28 |
capitalization]: |
| 29 |
suite = unittest.TestLoader().loadTestsFromModule(module) |
| 30 |
res = unittest.TextTestRunner(verbosity=2).run(suite) |
| 31 |
if(not(res.wasSuccessful())): |
| 32 |
failures += 1 |
| 33 |
sys.exit(min(failures, 255)) |