vs-overlay/plugins/vsutil/fail-tests.diff

21 lines
566 B
Diff
Raw Normal View History

diff --git a/setup.py b/setup.py
index a66f14c..a7de6b4 100644
--- a/setup.py
+++ b/setup.py
@@ -25,11 +25,14 @@ class DiscoverTest(test):
def run_tests(self):
import os
+ import sys
import unittest
path = os.path.join(os.path.dirname(__file__), "tests")
runner = unittest.TextTestRunner(verbosity=2)
suite = unittest.TestLoader().discover(path, pattern="test_*.py")
- runner.run(suite)
+ result = runner.run(suite)
+ if not result.wasSuccessful():
+ sys.exit(1)
setup(