diff --git a/tests.py b/tests.py index 482ab83..b7e17a7 100644 --- a/tests.py +++ b/tests.py @@ -1,6 +1,18 @@ +#!/usr/bin/env python3 + import doctest from kosmorrolib import * -for module in [events, ephemerides]: - doctest.testmod(module, verbose=True) + +if __name__ == '__main__': + failures = 0 + tests = 0 + + for module in [events, ephemerides]: + (f, t) = doctest.testmod(module) + failures += f + tests += t + + if failures == 0: + print("✔ All %d tests successfully passed." % tests)