Skip to content

Commit 912f941

Browse files
belyalovdpgeorge
authored andcommitted
unittest: Exit with non zero code in case of failures. Fixing micropython#259
1 parent 0a581ef commit 912f941

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

unittest/unittest.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
import sys
2+
3+
14
class SkipTest(Exception):
25
pass
36

@@ -217,3 +220,5 @@ def test_cases(m):
217220
suite.addTest(c)
218221
runner = TestRunner()
219222
result = runner.run(suite)
223+
# Terminate with non zero return code in case of failures
224+
sys.exit(result.failuresNum > 0)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy