Skip to content

Commit

Permalink
Merge pull request #1512 from input-output-hk/use_named_args
Browse files Browse the repository at this point in the history
Use named arguments
  • Loading branch information
mkoura committed Nov 29, 2022
2 parents 151ba5d + f5b14b8 commit 8d6d7c6
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 10 deletions.
16 changes: 12 additions & 4 deletions cardano_node_tests/tests/test_tx_basic.py
Expand Up @@ -616,7 +616,9 @@ def test_missing_tx_out(
src_record=payment_addrs[0],
dst_record=payment_addrs[1],
)
txins, __ = tx_common.get_txins_txouts(tx_raw_output.txins, tx_raw_output.txouts)
txins, __ = tx_common.get_txins_txouts(
txins=tx_raw_output.txins, txouts=tx_raw_output.txouts
)

cli_args = [
"transaction",
Expand Down Expand Up @@ -653,7 +655,9 @@ def test_missing_ttl(
src_record=payment_addrs[0],
dst_record=payment_addrs[0],
)
txins, txouts = tx_common.get_txins_txouts(tx_raw_template.txins, tx_raw_template.txouts)
txins, txouts = tx_common.get_txins_txouts(
txins=tx_raw_template.txins, txouts=tx_raw_template.txouts
)
tx_raw_output = tx_raw_template._replace(invalid_hereafter=None)

cluster.cli(
Expand Down Expand Up @@ -702,7 +706,9 @@ def test_multiple_same_txins(
src_record=payment_addrs[0],
dst_record=payment_addrs[0],
)
txins, txouts = tx_common.get_txins_txouts(tx_raw_output.txins, tx_raw_output.txouts)
txins, txouts = tx_common.get_txins_txouts(
txins=tx_raw_output.txins, txouts=tx_raw_output.txouts
)

cluster.cli(
[
Expand Down Expand Up @@ -757,7 +763,9 @@ def test_build_multiple_same_txins(
dst_record=payment_addrs[1],
for_build_command=True,
)
txins, txouts = tx_common.get_txins_txouts(tx_raw_output.txins, tx_raw_output.txouts)
txins, txouts = tx_common.get_txins_txouts(
txins=tx_raw_output.txins, txouts=tx_raw_output.txouts
)

cluster.cli(
[
Expand Down
24 changes: 18 additions & 6 deletions cardano_node_tests/tests/test_tx_negative.py
Expand Up @@ -914,7 +914,9 @@ def test_missing_fee(
src_record=pool_users[0].payment,
dst_record=pool_users[1].payment,
)
txins, txouts = tx_common.get_txins_txouts(tx_raw_output.txins, tx_raw_output.txouts)
txins, txouts = tx_common.get_txins_txouts(
txins=tx_raw_output.txins, txouts=tx_raw_output.txouts
)

with pytest.raises(clusterlib.CLIError) as excinfo:
cluster.cli(
Expand Down Expand Up @@ -958,7 +960,9 @@ def test_missing_ttl(
src_record=pool_users[0].payment,
dst_record=pool_users[1].payment,
)
txins, txouts = tx_common.get_txins_txouts(tx_raw_output.txins, tx_raw_output.txouts)
txins, txouts = tx_common.get_txins_txouts(
txins=tx_raw_output.txins, txouts=tx_raw_output.txouts
)

with pytest.raises(clusterlib.CLIError) as excinfo:
cluster.cli(
Expand Down Expand Up @@ -999,7 +1003,9 @@ def test_missing_tx_in(
src_record=pool_users[0].payment,
dst_record=pool_users[1].payment,
)
__, txouts = tx_common.get_txins_txouts(tx_raw_output.txins, tx_raw_output.txouts)
__, txouts = tx_common.get_txins_txouts(
txins=tx_raw_output.txins, txouts=tx_raw_output.txouts
)

with pytest.raises(clusterlib.CLIError) as excinfo:
cluster.cli(
Expand Down Expand Up @@ -1039,7 +1045,9 @@ def test_build_missing_tx_in(
dst_record=pool_users[1].payment,
for_build_command=True,
)
__, txouts = tx_common.get_txins_txouts(tx_raw_output.txins, tx_raw_output.txouts)
__, txouts = tx_common.get_txins_txouts(
txins=tx_raw_output.txins, txouts=tx_raw_output.txouts
)

with pytest.raises(clusterlib.CLIError) as excinfo:
cluster.cli(
Expand Down Expand Up @@ -1080,7 +1088,9 @@ def test_build_missing_change_address(
dst_record=pool_users[1].payment,
for_build_command=True,
)
txins, txouts = tx_common.get_txins_txouts(tx_raw_output.txins, tx_raw_output.txouts)
txins, txouts = tx_common.get_txins_txouts(
txins=tx_raw_output.txins, txouts=tx_raw_output.txouts
)

with pytest.raises(clusterlib.CLIError) as excinfo:
cluster.cli(
Expand Down Expand Up @@ -1120,7 +1130,9 @@ def test_build_multiple_change_addresses(
dst_record=pool_users[1].payment,
for_build_command=True,
)
txins, txouts = tx_common.get_txins_txouts(tx_raw_output.txins, tx_raw_output.txouts)
txins, txouts = tx_common.get_txins_txouts(
txins=tx_raw_output.txins, txouts=tx_raw_output.txouts
)

with pytest.raises(clusterlib.CLIError) as excinfo:
cluster.cli(
Expand Down

0 comments on commit 8d6d7c6

Please sign in to comment.