@@ -404,10 +404,9 @@ def test_address_info_with_invalid_address(self, cluster: clusterlib.ClusterLib,
404404
405405 with pytest .raises (clusterlib .CLIError ) as excinfo :
406406 cluster .g_address .get_address_info (address = address )
407-
408- err_str = str (excinfo .value )
409-
410- assert "Invalid address" in err_str , err_str
407+ exc_value = str (excinfo .value )
408+ with common .allow_unstable_error_messages ():
409+ assert "Invalid address" in exc_value , exc_value
411410
412411
413412class TestAddressBuild :
@@ -535,10 +534,9 @@ def test_invalid_payment_info(
535534 payment_vkey_file = vkey_file ,
536535 payment_script_file = script_file ,
537536 )
538-
539- err_str = str (excinfo .value )
540-
541- assert "Invalid key" in err_str or "Syntax error in script" in err_str , err_str
537+ exc_value = str (excinfo .value )
538+ with common .allow_unstable_error_messages ():
539+ assert "Invalid key" in exc_value or "Syntax error in script" in exc_value , exc_value
542540
543541 @allure .link (helpers .get_vcs_link ())
544542 @pytest .mark .parametrize (
@@ -597,14 +595,13 @@ def test_invalid_stake_info(
597595 stake_script_file = script_file ,
598596 stake_address = key if option == "address" else None ,
599597 )
600-
601- err_str = str (excinfo .value )
602-
603- assert (
604- "Invalid key" in err_str
605- or "Syntax error in script" in err_str
606- or "invalid address" in err_str
607- ), err_str
598+ exc_value = str (excinfo .value )
599+ with common .allow_unstable_error_messages ():
600+ assert (
601+ "Invalid key" in exc_value
602+ or "Syntax error in script" in exc_value
603+ or "invalid address" in exc_value
604+ ), exc_value
608605
609606
610607class TestAddressKeyHash :
@@ -665,10 +662,9 @@ def test_invalid_verification_key(self, cluster: clusterlib.ClusterLib, option:
665662 payment_vkey = vkey if option == "vkey" else None ,
666663 payment_vkey_file = vkey_file ,
667664 )
668-
669- err_str = str (excinfo .value )
670-
671- assert "Invalid key" in err_str , err_str
665+ exc_value = str (excinfo .value )
666+ with common .allow_unstable_error_messages ():
667+ assert "Invalid key" in exc_value , exc_value
672668
673669
674670class TestKey :
@@ -737,12 +733,12 @@ def test_non_extended_key_error(self, cluster: clusterlib.ClusterLib):
737733 cluster .g_key .gen_non_extended_verification_key (
738734 key_name = temp_template , extended_verification_key_file = payment_keys .skey_file
739735 )
740-
741- err_str = str ( excinfo . value )
742- assert (
743- "Error: Invalid key." in err_str
744- or "TextEnvelope type error: Expected one of:" in err_str
745- ), err_str
736+ exc_value = str ( excinfo . value )
737+ with common . allow_unstable_error_messages ():
738+ assert (
739+ "Error: Invalid key." in exc_value
740+ or "TextEnvelope type error: Expected one of:" in exc_value
741+ ), exc_value
746742
747743
748744class TestQueryUTxO :
@@ -873,16 +869,15 @@ def test_tx_in_invalid_data(
873869 * cluster .magic_args ,
874870 ]
875871 )
876-
877- err_str = str (excinfo .value )
878-
879- if invalid_param == "tx_hash" :
880- assert (
881- "expecting hexadecimal digit" in err_str
882- or "expecting transaction id (hexadecimal)" in err_str
883- ), err_str
884- else :
885- assert "expecting digit" in err_str , err_str
872+ exc_value = str (excinfo .value )
873+ with common .allow_unstable_error_messages ():
874+ if invalid_param == "tx_hash" :
875+ assert (
876+ "expecting hexadecimal digit" in exc_value
877+ or "expecting transaction id (hexadecimal)" in exc_value
878+ ), exc_value
879+ else :
880+ assert "expecting digit" in exc_value , exc_value
886881
887882 @allure .link (helpers .get_vcs_link ())
888883 @hypothesis .given (filter_str = st .text (alphabet = common .ADDR_ALPHABET , min_size = 1 ))
@@ -905,9 +900,9 @@ def test_address_invalid_data(self, cluster: clusterlib.ClusterLib, filter_str:
905900 * cluster .magic_args ,
906901 ]
907902 )
908-
909- err_str = str ( excinfo . value )
910- assert "invalid address" in err_str , err_str
903+ exc_value = str ( excinfo . value )
904+ with common . allow_unstable_error_messages ():
905+ assert "invalid address" in exc_value , exc_value
911906
912907
913908class TestStakeAddressKeyHash :
@@ -968,10 +963,9 @@ def test_invalid_verification_key(self, cluster: clusterlib.ClusterLib, option:
968963 stake_vkey = vkey if option == "vkey" else None ,
969964 stake_vkey_file = vkey_file ,
970965 )
971-
972- err_str = str (excinfo .value )
973-
974- assert "Invalid key" in err_str , err_str
966+ exc_value = str (excinfo .value )
967+ with common .allow_unstable_error_messages ():
968+ assert "Invalid key" in exc_value , exc_value
975969
976970
977971class TestAdvancedQueries :
@@ -1427,9 +1421,9 @@ def test_slot_number_invalid_format(
14271421
14281422 with pytest .raises (clusterlib .CLIError ) as excinfo :
14291423 cluster .g_query .query_cli (["slot-number" , timestamp_str ])
1430- err_str = str (excinfo .value )
1431-
1432- assert "parseTimeOrError" in err_str , err_str
1424+ exc_value = str (excinfo .value )
1425+ with common . allow_unstable_error_messages ():
1426+ assert "parseTimeOrError" in exc_value , exc_value
14331427
14341428 @allure .link (helpers .get_vcs_link ())
14351429 @pytest .mark .parametrize ("time_val" , ("above" , "bellow" ))
@@ -1451,6 +1445,6 @@ def test_slot_number_out_of_range(
14511445
14521446 with pytest .raises (clusterlib .CLIError ) as excinfo :
14531447 cluster .g_query .get_slot_number (timestamp = timestamp )
1454- err_str = str (excinfo .value )
1455-
1456- assert "PastHorizon" in err_str , err_str
1448+ exc_value = str (excinfo .value )
1449+ with common . allow_unstable_error_messages ():
1450+ assert "PastHorizon" in exc_value , exc_value
0 commit comments