hotfix for py test (#17)

This commit is contained in:
Bo QIU 2024-01-31 18:13:25 +08:00 committed by GitHub
parent cb8c6ebf81
commit 012f5b34ec
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 10 deletions

View File

@ -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

View File

@ -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
)