diff --git a/tests/test_config.py b/tests/test_config.py index 47a4e24035..73c1408e03 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -254,7 +254,10 @@ def test_config_pickling(): configparser.IntParam(5, lambda i: i > 0), in_c_key=False, ) - with pytest.raises(AttributeError, match="Can't pickle local object"): + with pytest.raises( + AttributeError, + match="Can't (pickle|get) local object 'test_config_pickling..'", + ): pickle.dump(root, io.BytesIO())