Browse Source

test: enhance return of the doctest script

tags/v0.10.0
Jérôme Deuchnord 3 years ago
parent
commit
7349d2cebb
1 changed files with 14 additions and 2 deletions
  1. +14
    -2
      tests.py

+ 14
- 2
tests.py View File

@@ -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)

Loading…
Cancel
Save