mirror of
https://github.com/mirror/wget.git
synced 2025-03-25 01:00:13 +08:00
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:
parent
d26377053d
commit
9883f9fb10
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user