mirror of
https://codeberg.org/anoncontributorxmr/monero.git
synced 2024-12-26 15:17:49 +00:00
Merge pull request #6041
261abf7
functional_tests: ensure mining stops on error in mining test (moneromooo-monero)
This commit is contained in:
commit
a6fa7d493e
1 changed files with 11 additions and 1 deletions
|
@ -170,5 +170,15 @@ class MiningTest():
|
|||
assert res.hash == block_hash
|
||||
|
||||
|
||||
class Guard:
|
||||
def __enter__(self):
|
||||
pass
|
||||
|
||||
def __exit__(self, exc_type, exc_value, traceback):
|
||||
daemon = Daemon()
|
||||
try: daemon.stop_mining()
|
||||
except: pass
|
||||
|
||||
if __name__ == '__main__':
|
||||
MiningTest().run_test()
|
||||
with Guard() as guard:
|
||||
MiningTest().run_test()
|
||||
|
|
Loading…
Reference in a new issue