aboutsummaryrefslogtreecommitdiff
path: root/run_unittests.py
diff options
context:
space:
mode:
Diffstat (limited to 'run_unittests.py')
-rwxr-xr-xrun_unittests.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/run_unittests.py b/run_unittests.py
index 103847a..a520ad2 100755
--- a/run_unittests.py
+++ b/run_unittests.py
@@ -1933,6 +1933,16 @@ class FailureTests(BasePlatformTests):
self.assertRegex(out, r'Also couldn\'t find a fallback subproject in '
'.*subprojects.*failingsubproj.*for the dependency.*somedep')
+ def test_exception_exit_status(self):
+ '''
+ Test exit status on python exception
+ '''
+ tdir = os.path.join(self.unit_test_dir, '21 exit status')
+ with self.assertRaises(subprocess.CalledProcessError) as cm:
+ self.init(tdir, inprocess=False)
+ self.assertEqual(cm.exception.returncode, 2)
+ self.wipe()
+
class WindowsTests(BasePlatformTests):
'''