tests: exit with error code if failure when running all tests
Some checks failed
Tests / tests (pull_request) Failing after 5s
Some checks failed
Tests / tests (pull_request) Failing after 5s
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
import sys
|
||||||
from typing import Type
|
from typing import Type
|
||||||
|
|
||||||
from midas.cli.ansi import Ansi
|
from midas.cli.ansi import Ansi
|
||||||
@@ -37,6 +38,7 @@ def main():
|
|||||||
print(Ansi.FG(Ansi.BRIGHT_GREEN) + "All tests passed!" + Ansi.RESET)
|
print(Ansi.FG(Ansi.BRIGHT_GREEN) + "All tests passed!" + Ansi.RESET)
|
||||||
else:
|
else:
|
||||||
print(Ansi.FG(Ansi.BRIGHT_RED) + "Some tests failed!" + Ansi.RESET)
|
print(Ansi.FG(Ansi.BRIGHT_RED) + "Some tests failed!" + Ansi.RESET)
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
Reference in New Issue
Block a user