aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2019-06-01 20:21:21 +0200
committerRiccardo Spagni <ric@spagni.net>2019-06-01 20:21:22 +0200
commit42e2ed31ae726bc40ff6498bd386be43fc5d9e4f (patch)
tree4c82685507ceb6c3e0542c0043e2700b1d12e822
parentMerge pull request #5557 (diff)
parentfunctional_tests: fix rare get_output_distribution failure (diff)
downloadmonero-42e2ed31ae726bc40ff6498bd386be43fc5d9e4f.tar.xz
Merge pull request #5558
4ac52e52 functional_tests: fix rare get_output_distribution failure (moneromooo-monero)
-rwxr-xr-xtests/functional_tests/get_output_distribution.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/functional_tests/get_output_distribution.py b/tests/functional_tests/get_output_distribution.py
index 2a0762d5e..061b8dbe2 100755
--- a/tests/functional_tests/get_output_distribution.py
+++ b/tests/functional_tests/get_output_distribution.py
@@ -213,5 +213,14 @@ class GetOutputDistributionTest():
assert d.distribution[h] == 0
+class Guard:
+ def __enter__(self):
+ for i in range(4):
+ Wallet(idx = i).auto_refresh(False)
+ def __exit__(self, exc_type, exc_value, traceback):
+ for i in range(4):
+ Wallet(idx = i).auto_refresh(True)
+
if __name__ == '__main__':
- GetOutputDistributionTest().run_test()
+ with Guard() as guard:
+ GetOutputDistributionTest().run_test()