summaryrefslogtreecommitdiff
path: root/simple_unit_tests.py
diff options
context:
space:
mode:
authorPaul McGuire <ptmcg@austin.rr.com>2019-04-01 22:52:44 -0500
committerPaul McGuire <ptmcg@austin.rr.com>2019-04-01 22:52:44 -0500
commit2cedb21cc3eff2a57f0d781dc38e679589664d3a (patch)
treeae7dabb8564b5ac719f2566660a396378a25f357 /simple_unit_tests.py
parentbf3e1b95adfbdf81bd24ec193ca901f63d260cbd (diff)
downloadpyparsing-git-2cedb21cc3eff2a57f0d781dc38e679589664d3a.tar.gz
General code cleanup; have unit test module exit(0 or 1) depending on test success, to trigger CI pass/fail; fix bug that crept into withAttribute; minor performance tweaks in Regex and Word
Diffstat (limited to 'simple_unit_tests.py')
-rw-r--r--simple_unit_tests.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/simple_unit_tests.py b/simple_unit_tests.py
index 888b4a8..28bdb16 100644
--- a/simple_unit_tests.py
+++ b/simple_unit_tests.py
@@ -458,4 +458,6 @@ if __name__ == '__main__':
# make into a suite and run it - this will run the tests in the same order
# they are declared in this module
suite = unittest.TestSuite(cls() for cls in test_case_classes)
- unittest.TextTestRunner().run(suite)
+ result = unittest.TextTestRunner().run(suite)
+
+ exit(0 if result.wasSuccessful() else 1)