diff --git a/tests/integration/go_ethereum/common.py b/tests/integration/go_ethereum/common.py index 0be57d54e5..e2603a65c8 100644 --- a/tests/integration/go_ethereum/common.py +++ b/tests/integration/go_ethereum/common.py @@ -71,18 +71,18 @@ def test_eth_chainId(self, web3): pytest.xfail('eth_chainId not implemented in geth 1.7.2') super().test_eth_chainId(web3) + @pytest.mark.xfail(reason='eth_signTypedData has not been released in geth') def test_eth_signTypedData(self, web3, unlocked_account_dual_type): - pytest.xfail('eth_signTypedData JSON RPC call has not been released in geth') super().test_eth_signTypedData( web3, unlocked_account_dual_type ) + @pytest.mark.xfail(reason='eth_signTypedData has not been released in geth') def test_invalid_eth_signTypedData(self, web3, unlocked_account_dual_type): - pytest.xfail('eth_signTypedData JSON RPC call has not been released in geth') super().test_invalid_eth_signTypedData( web3, unlocked_account_dual_type ) diff --git a/tests/integration/parity/common.py b/tests/integration/parity/common.py index a277c5d49e..133e9c8e50 100644 --- a/tests/integration/parity/common.py +++ b/tests/integration/parity/common.py @@ -168,18 +168,18 @@ def test_eth_getLogs_without_logs(self, web3, block_with_txn_with_log): result = web3.eth.getLogs(filter_params) assert len(result) == 0 + @pytest.mark.xfail(reason='eth_signTypedData has not been released in Parity') def test_eth_signTypedData(self, web3, unlocked_account_dual_type): - pytest.xfail('eth_signTypedData JSON RPC call has not been released in parity') super().test_eth_signTypedData( web3, unlocked_account_dual_type ) + @pytest.mark.xfail(reason='eth_signTypedData has not been released in Parity') def test_invalid_eth_signTypedData(self, web3, unlocked_account_dual_type): - pytest.xfail('eth_signTypedData JSON RPC call has not been released in parity') super().test_invalid_eth_signTypedData( web3, unlocked_account_dual_type ) diff --git a/web3/_utils/module_testing/eth_module.py b/web3/_utils/module_testing/eth_module.py index 11044afa51..1dae7fd181 100644 --- a/web3/_utils/module_testing/eth_module.py +++ b/web3/_utils/module_testing/eth_module.py @@ -294,12 +294,12 @@ def test_invalid_eth_signTypedData(self, } } ''' - with pytest.raises(ValueError) as e: + with pytest.raises(ValueError, + match=r".*Expected 2 items for array type Person\[2\], got 1 items.*"): web3.eth.signTypedData( unlocked_account_dual_type, json.loads(invalid_typed_message) ) - assert "Expected 2 items for array type Person[2], got 1 items" in str(e.value) def test_eth_signTransaction(self, web3, unlocked_account): txn_params = { diff --git a/web3/_utils/module_testing/personal_module.py b/web3/_utils/module_testing/personal_module.py index d9c891a1ed..e7fc9f4e42 100644 --- a/web3/_utils/module_testing/personal_module.py +++ b/web3/_utils/module_testing/personal_module.py @@ -332,10 +332,10 @@ def test_invalid_personal_sign_typed_data(self, } } ''' - with pytest.raises(ValueError) as e: + with pytest.raises(ValueError, + match=r".*Expected 2 items for array type Person\[2\], got 1 items.*"): web3.parity.personal.signTypedData( json.loads(invalid_typed_message), unlockable_account_dual_type, unlockable_account_pw ) - assert "Expected 2 items for array type Person[2], got 1 items" in str(e.value)