aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2019-04-29 09:35:12 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2019-09-17 11:38:15 +0000
commitb9e09378ad0033affc99614d4328e83783d87b86 (patch)
tree8699856dbb791f4592242cc5e3dd0be05f9714bc /tests
parentMerge pull request #5861 (diff)
downloadmonero-b9e09378ad0033affc99614d4328e83783d87b86.tar.xz
functional_tests: move extraneous stuff out of the framework
Diffstat (limited to 'tests')
-rwxr-xr-xtests/functional_tests/speed.py21
1 files changed, 16 insertions, 5 deletions
diff --git a/tests/functional_tests/speed.py b/tests/functional_tests/speed.py
index ed1e332e9..5858c5803 100755
--- a/tests/functional_tests/speed.py
+++ b/tests/functional_tests/speed.py
@@ -47,14 +47,26 @@ from framework.wallet import Wallet
class SpeedTest():
- def set_test_params(self):
- self.num_nodes = 1
+ def reset(self):
+ print 'Resetting blockchain'
+ daemon = Daemon()
+ daemon.pop_blocks(1000)
+ daemon.flush_txpool()
def run_test(self):
+ self.reset()
+
daemon = Daemon()
wallet = Wallet()
- destinations = wallet.make_uniform_destinations('44AFFq5kSiGBoZ4NMDwYtN18obc8AemS33DBLWs3H7otXft3XjrpDtQGv7SqSsaBYBb98uNbr2VBBEt7f2wfn3RVGQBEP3A',1,3)
+ # close the wallet if any, will throw if none is loaded
+ try: wallet.close_wallet()
+ except: pass
+ wallet.restore_deterministic_wallet('velvet lymph giddy number token physics poetry unquoted nibs useful sabotage limits benches lifestyle eden nitrogen anvil fewest avoid batch vials washing fences goat unquoted')
+
+ destinations = []
+ for i in range(3):
+ destinations.append({"amount":1,"address":'44AFFq5kSiGBoZ4NMDwYtN18obc8AemS33DBLWs3H7otXft3XjrpDtQGv7SqSsaBYBb98uNbr2VBBEt7f2wfn3RVGQBEP3A'})
self._test_speed_generateblocks(daemon=daemon, blocks=70)
for i in range(1, 10):
@@ -69,7 +81,6 @@ class SpeedTest():
start = time.time()
res = daemon.generateblocks('42ey1afDFnn4886T7196doS9GPMzexD9gXpsZJDwVjeRVdFCSoHnv7KPbBeGpzJBzHRCAs9UxqeoyFQMYbqSWYTfJJQAWDm', blocks)
- # wallet seed: velvet lymph giddy number token physics poetry unquoted nibs useful sabotage limits benches lifestyle eden nitrogen anvil fewest avoid batch vials washing fences goat unquoted
print('generating ', blocks, 'blocks took: ', time.time() - start, 'seconds')
@@ -77,7 +88,7 @@ class SpeedTest():
print('Test speed of transfer')
start = time.time()
- destinations = wallet.make_uniform_destinations('44AFFq5kSiGBoZ4NMDwYtN18obc8AemS33DBLWs3H7otXft3XjrpDtQGv7SqSsaBYBb98uNbr2VBBEt7f2wfn3RVGQBEP3A',1)
+ destinations = [{"amount":1,"address":'44AFFq5kSiGBoZ4NMDwYtN18obc8AemS33DBLWs3H7otXft3XjrpDtQGv7SqSsaBYBb98uNbr2VBBEt7f2wfn3RVGQBEP3A'}]
res = wallet.transfer_split(destinations)
print('generating tx took: ', time.time() - start, 'seconds')