regression tests

This commit is contained in:
Mark Pilgrim
2009-06-09 13:08:20 -04:00
parent 8357efb7ad
commit 6b34c48abd
2 changed files with 16 additions and 1 deletions
+15
View File
@@ -0,0 +1,15 @@
#!/usr/bin/python3
import unittest
import os
import glob
def regressionTest():
filenames = glob.glob('*test*.py')
module_names = [os.path.splitext(os.path.basename(f))[0] for f in filenames]
modules = [__import__(name) for name in module_names]
tests = [unittest.defaultTestLoader.loadTestsFromModule(m) for m in modules]
return unittest.TestSuite(tests)
if __name__ == '__main__':
unittest.main(defaultTest='regressionTest')
+1 -1
View File
@@ -8,7 +8,7 @@ die () {
hg status|grep "^\?" && die "Stray files found."
echo "running unit tests"
cd examples/
python3 regression.py
python3 regression.py || die "Unit tests failed."
cd ..
ssh diveintomark.org "hg -R /home/mark/db/diveintopython3/ serve --stdio" &
hg push ssh://mark@diveintomark.org//home/mark/db/diveintopython3/