Sfoglia il codice sorgente

test: enhance return of the doctest script

tags/v0.10.0
Jérôme Deuchnord 3 anni fa
parent
commit
7349d2cebb
1 ha cambiato i file con 14 aggiunte e 2 eliminazioni
  1. +14
    -2
      tests.py

+ 14
- 2
tests.py Vedi 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)

Caricamento…
Annulla
Salva