diff --git a/tests/test_box.py b/tests/test_box.py index c1c1ca2..d576086 100644 --- a/tests/test_box.py +++ b/tests/test_box.py @@ -402,7 +402,7 @@ def test_box_pass_unexpected_argument(boxclass): with pytest.raises(TypeError) as excinfo: fn(1, 2) - assert str(excinfo.value) == "fn() got an unexpected keyword argument 'd'" + assert "fn() got an unexpected keyword argument 'd'" in str(excinfo.value) def test_box_pass_keyerror(boxclass): diff --git a/tests/test_stack.py b/tests/test_stack.py index 725d378..10129b3 100644 --- a/tests/test_stack.py +++ b/tests/test_stack.py @@ -472,7 +472,7 @@ def test_box_pass_unexpected_argument(boxclass, teststack): with pytest.raises(TypeError) as excinfo: fn(1, 2) - assert str(excinfo.value) == "fn() got an unexpected keyword argument 'd'" + assert "fn() got an unexpected keyword argument 'd'" in str(excinfo.value) def test_box_pass_keyerror(boxclass, teststack):