We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7dabc85 commit ebeb87bCopy full SHA for ebeb87b
Makefile
@@ -13,7 +13,6 @@ wheel:
13
test:
14
@echo "Testing..."
15
cd tests && python3 run_all.py
16
- @echo "Done."
17
18
pub:
19
@echo "Publishing wheel..."
tests/run_all.py
@@ -2,10 +2,14 @@
2
3
import unittest
4
5
-# 使用 TestLoader() 加载所有测试模块
6
test_loader = unittest.TestLoader()
7
test_suite = test_loader.discover('./')
8
9
-# 使用 TextTestRunner() 运行测试套件
10
test_runner = unittest.TextTestRunner()
11
-test_runner.run(test_suite)
+ret = test_runner.run(test_suite)
+
+# if any test fails, exit with non-zero code
12
+if len(ret.failures) > 0 or len(ret.errors) > 0:
+ exit(1)
+else:
+ exit(0)
0 commit comments