Skip to content

Commit 1722c9b

Browse files
author
HuangYi
committed
fix json decode error
1 parent ae885c0 commit 1722c9b

3 files changed

Lines changed: 63 additions & 26 deletions

File tree

integration_tests/cosmoscli.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import enum
22
import hashlib
33
import json
4+
import subprocess
45
import tempfile
56

67
import bech32
@@ -37,10 +38,10 @@ class ChainCommand:
3738
def __init__(self, cmd):
3839
self.cmd = cmd
3940

40-
def __call__(self, cmd, *args, stdin=None, **kwargs):
41+
def __call__(self, cmd, *args, stdin=None, stderr=subprocess.STDOUT, **kwargs):
4142
"execute chain-maind"
4243
args = " ".join(build_cli_args_safe(cmd, *args, **kwargs))
43-
return interact(f"{self.cmd} {args}", input=stdin)
44+
return interact(f"{self.cmd} {args}", input=stdin, stderr=stderr)
4445

4546

4647
class CosmosCLI:
@@ -1051,6 +1052,7 @@ def transfer_tokens(self, from_, to, amount, **kwargs):
10511052
amount,
10521053
"-y",
10531054
home=self.data_dir,
1055+
stderr=subprocess.DEVNULL,
10541056
**(default_kwargs | kwargs),
10551057
)
10561058
)

integration_tests/poetry.lock

Lines changed: 58 additions & 23 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

integration_tests/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ python-dateutil = "^2.8.1"
2020
web3 = "^5.20.1"
2121
eth-bloom = "^1.0.4"
2222
python-dotenv = "^0.19.2"
23-
pystarport = "^0.2.3"
23+
pystarport = { git = "https://github.com/crypto-com/pystarport.git", branch = "main" }
2424
websockets = "^9.1"
2525
toml = "^0.10.2"
2626
pysha3 = "^1.0.2"

0 commit comments

Comments
 (0)