aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2019-06-01 20:30:54 +0200
committerRiccardo Spagni <ric@spagni.net>2019-06-01 20:30:54 +0200
commit2f5efc7f590fb617b274da65bd4711fd67ad1416 (patch)
tree4c82685507ceb6c3e0542c0043e2700b1d12e822
parentMerge pull request #5563 (diff)
parentfunctional_tests: fix rare get_output_distribution failure (diff)
downloadmonero-2f5efc7f590fb617b274da65bd4711fd67ad1416.tar.xz
Merge pull request #5562
13864702 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()