From 012f5b34ec45b6952f7a7f7c7db1076b12e1ec13 Mon Sep 17 00:00:00 2001 From: Bo QIU <35757521+boqiu@users.noreply.github.com> Date: Wed, 31 Jan 2024 18:13:25 +0800 Subject: [PATCH] hotfix for py test (#17) --- tests/test_framework/blockchain_node.py | 1 + tests/test_framework/test_framework.py | 13 +++---------- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/tests/test_framework/blockchain_node.py b/tests/test_framework/blockchain_node.py index 09cf50c..be4674a 100644 --- a/tests/test_framework/blockchain_node.py +++ b/tests/test_framework/blockchain_node.py @@ -44,6 +44,7 @@ class TestNode: def __init__( self, node_type, index, data_dir, rpc_url, binary, config, log, rpc_timeout=10 ): + assert os.path.exists(binary), ("blockchain binary not found: %s" % binary) self.node_type = node_type self.index = index self.data_dir = data_dir diff --git a/tests/test_framework/test_framework.py b/tests/test_framework/test_framework.py index ce11066..2985e3f 100644 --- a/tests/test_framework/test_framework.py +++ b/tests/test_framework/test_framework.py @@ -309,7 +309,9 @@ class TestFramework: ionion_node_rpc_url, file_to_upload, ): - assert os.path.exists(self.cli_binary), "%s should be exist" % self.cli_binary + assert os.path.exists(self.cli_binary), ( + "zgs CLI binary not found: %s" % self.cli_binary + ) upload_args = [ self.cli_binary, "upload", @@ -417,15 +419,6 @@ class TestFramework: self.token_contract_path = os.path.abspath(self.options.token_contract) self.mine_contract_path = os.path.abspath(self.options.mine_contract) - assert os.path.exists(self.blockchain_binary), ( - "blockchain binary not found: %s" % self.blockchain_binary - ) - assert os.path.exists(self.zgs_binary), ( - "zgs binary not found: %s" % self.zgs_binary - ) - assert os.path.exists(self.cli_binary), ( - "zgs CLI binary not found: %s" % self.cli_binary - ) assert os.path.exists(self.contract_path), ( "%s should be exist" % self.contract_path )