Fail python tests when post_hook errors

* testenv/test/base_test.py (__exit__): Return self.tests_passed
  (__test_cleanup): Set self.tests_passed to False on exception
This commit is contained in:
Tim Rühsen 2016-04-08 15:29:24 +02:00
parent d26377053d
commit 9883f9fb10

View File

@ -162,6 +162,7 @@ class BaseTest:
shutil.rmtree(self.get_test_dir())
except:
print("Unknown Exception while trying to remove Test Environment.")
self.tests_passed = False
def _exit_test(self):
self.__test_cleanup()
@ -263,4 +264,4 @@ class BaseTest:
traceback.print_tb(exc_tb)
self.__test_cleanup()
return True
return self.tests_passed