瀏覽代碼

test: enhance return of the doctest script

tags/v0.10.0
Jérôme Deuchnord 3 年之前
父節點
當前提交
7349d2cebb
共有 1 個檔案被更改,包括 14 行新增2 行删除
  1. +14
    -2
      tests.py

+ 14
- 2
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)

Loading…
取消
儲存