@@ -728,7 +728,7 @@ def _int_out_of_range(
728
728
dst_addr : clusterlib .AddressRecord ,
729
729
cost_per_unit : plutus_common .ExecutionCost ,
730
730
plutus_version : str ,
731
- ):
731
+ ) -> str :
732
732
"""Try to spend a locked UTxO with redeemer int value that is not in allowed range."""
733
733
redeemer_content = {}
734
734
if redeemer_value % 2 == 0 :
@@ -765,16 +765,19 @@ def _int_out_of_range(
765
765
)
766
766
]
767
767
768
- with pytest .raises (clusterlib .CLIError ) as excinfo :
768
+ err_str = ""
769
+ try :
769
770
cluster_obj .g_transaction .build_raw_tx_bare (
770
771
out_file = f"{ temp_template } _step2_tx.body" ,
771
772
txouts = txouts ,
772
773
tx_files = tx_files ,
773
774
fee = fee_redeem + spend_raw .FEE_REDEEM_TXSIZE ,
774
775
script_txins = plutus_txins ,
775
776
)
776
- err_str = str (excinfo .value )
777
- assert "Value out of range within the script data" in err_str , err_str
777
+ except clusterlib .CLIError as exc :
778
+ err_str = str (exc )
779
+
780
+ return err_str
778
781
779
782
@allure .link (helpers .get_vcs_link ())
780
783
@hypothesis .given (
@@ -880,7 +883,7 @@ def test_wrong_value_bellow_range(
880
883
):
881
884
"""Try to spend a locked UTxO with a redeemer int value < minimum allowed value.
882
885
883
- Expect failure.
886
+ Expect failure on node version < 1.36.0 .
884
887
"""
885
888
temp_template = f"{ common .get_test_id (cluster )} _{ plutus_version } _{ common .unique_time_str ()} "
886
889
@@ -889,7 +892,7 @@ def test_wrong_value_bellow_range(
889
892
)
890
893
891
894
script_utxos , collateral_utxos , payment_addrs = fund_script_guessing_game
892
- self ._int_out_of_range (
895
+ err_str = self ._int_out_of_range (
893
896
cluster_obj = cluster ,
894
897
temp_template = temp_template ,
895
898
script_utxos = script_utxos ,
@@ -900,6 +903,13 @@ def test_wrong_value_bellow_range(
900
903
plutus_version = plutus_version ,
901
904
)
902
905
906
+ assert (
907
+ # see node commit 2efdd2c173bee8f2463937cebb20614adf6180f0
908
+ not err_str
909
+ # on node version < 1.36.0
910
+ or "Value out of range within the script data" in err_str
911
+ ), err_str
912
+
903
913
@allure .link (helpers .get_vcs_link ())
904
914
@hypothesis .given (redeemer_value = st .integers (min_value = common .MAX_UINT64 + 1 ))
905
915
@hypothesis .example (redeemer_value = common .MAX_UINT64 + 1 )
@@ -916,7 +926,7 @@ def test_wrong_value_above_range(
916
926
):
917
927
"""Try to spend a locked UTxO with a redeemer int value > maximum allowed value.
918
928
919
- Expect failure.
929
+ Expect failure on node version < 1.36.0 .
920
930
"""
921
931
temp_template = f"{ common .get_test_id (cluster )} _{ plutus_version } _{ common .unique_time_str ()} "
922
932
@@ -925,7 +935,7 @@ def test_wrong_value_above_range(
925
935
)
926
936
927
937
script_utxos , collateral_utxos , payment_addrs = fund_script_guessing_game
928
- self ._int_out_of_range (
938
+ err_str = self ._int_out_of_range (
929
939
cluster_obj = cluster ,
930
940
temp_template = temp_template ,
931
941
script_utxos = script_utxos ,
@@ -936,6 +946,13 @@ def test_wrong_value_above_range(
936
946
plutus_version = plutus_version ,
937
947
)
938
948
949
+ assert (
950
+ # see node commit 2efdd2c173bee8f2463937cebb20614adf6180f0
951
+ not err_str
952
+ # on node version < 1.36.0
953
+ or "Value out of range within the script data" in err_str
954
+ ), err_str
955
+
939
956
@allure .link (helpers .get_vcs_link ())
940
957
@hypothesis .given (redeemer_value = st .binary (max_size = 64 ))
941
958
@common .hypothesis_settings (max_examples = 200 )
0 commit comments