diff options
| author | luigi1111 <luigi1111w@gmail.com> | 2019-12-12 13:41:05 -0600 |
|---|---|---|
| committer | luigi1111 <luigi1111w@gmail.com> | 2019-12-12 13:41:05 -0600 |
| commit | a6fa7d493ec2f3784a90c61395e4cc1b3b25ad29 (patch) | |
| tree | 093d897f0c134566cbbf324e6640c9ecb180dc8f /tests | |
| parent | 425da2381dfc6be1cefb9b7a7b3d9c9a6d8e3ddd (diff) | |
| parent | 261abf79e1c0faed88e1c4f14fdd925586f776b3 (diff) | |
| download | monzero-core-a6fa7d493ec2f3784a90c61395e4cc1b3b25ad29.tar.gz monzero-core-a6fa7d493ec2f3784a90c61395e4cc1b3b25ad29.tar.xz monzero-core-a6fa7d493ec2f3784a90c61395e4cc1b3b25ad29.zip | |
Merge pull request #6041
261abf7 functional_tests: ensure mining stops on error in mining test (moneromooo-monero)
Diffstat (limited to 'tests')
| -rwxr-xr-x | tests/functional_tests/mining.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/functional_tests/mining.py b/tests/functional_tests/mining.py index ad646417e..d067c25e1 100755 --- a/tests/functional_tests/mining.py +++ b/tests/functional_tests/mining.py @@ -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() |
