From 30f2a44a67b3abff18b1583f6a3966dfa3a9fc3f Mon Sep 17 00:00:00 2001 From: Thomas Wiecki Date: Fri, 9 Aug 2024 23:36:31 +0200 Subject: [PATCH 1/7] Pickle error message changed --- tests/test_config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_config.py b/tests/test_config.py index 47a4e24035..915f2244e4 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -254,7 +254,7 @@ 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 get local object 'test_config_pickling..'"): pickle.dump(root, io.BytesIO()) From dcd53f7ba7f931c064cc21dc6bdcc7dd75ff9966 Mon Sep 17 00:00:00 2001 From: Thomas Wiecki Date: Fri, 9 Aug 2024 23:44:36 +0200 Subject: [PATCH 2/7] Fix syntax --- tests/test_config.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/test_config.py b/tests/test_config.py index 915f2244e4..313e0a6356 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 get local object 'test_config_pickling..'"): + with pytest.raises( + AttributeError, + match="Can't get local object 'test_config_pickling..'", + ): pickle.dump(root, io.BytesIO()) From 6710483a6982ecaad40dbe60e4e609123d9ce42b Mon Sep 17 00:00:00 2001 From: Thomas Wiecki Date: Fri, 9 Aug 2024 23:47:05 +0200 Subject: [PATCH 3/7] Fix syntax --- tests/test_config.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/test_config.py b/tests/test_config.py index 313e0a6356..30948fe194 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -255,9 +255,9 @@ def test_config_pickling(): in_c_key=False, ) with pytest.raises( - AttributeError, - match="Can't get local object 'test_config_pickling..'", - ): + AttributeError, + match="Can't get local object 'test_config_pickling..'", + ): pickle.dump(root, io.BytesIO()) From 9620588be8b5bcee063e65105e58afc71c5f14ff Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 9 Aug 2024 21:54:24 +0000 Subject: [PATCH 4/7] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- tests/test_config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_config.py b/tests/test_config.py index 30948fe194..41a2744065 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -255,7 +255,7 @@ def test_config_pickling(): in_c_key=False, ) with pytest.raises( - AttributeError, + AttributeError, match="Can't get local object 'test_config_pickling..'", ): pickle.dump(root, io.BytesIO()) From 4673a6b4cc2d6dd3403ec51fa74b6d2e86d75a7a Mon Sep 17 00:00:00 2001 From: Thomas Wiecki Date: Sat, 10 Aug 2024 00:04:49 +0200 Subject: [PATCH 5/7] Different message. --- tests/test_config.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_config.py b/tests/test_config.py index 41a2744065..ac37072b13 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -255,8 +255,8 @@ def test_config_pickling(): in_c_key=False, ) with pytest.raises( - AttributeError, - match="Can't get local object 'test_config_pickling..'", + AttributeError, + match="Can't pickle local object 'test_config_pickling..'", ): pickle.dump(root, io.BytesIO()) From 9e20c00c788dd08e4d1a8acc1b802997995dccfa Mon Sep 17 00:00:00 2001 From: Thomas Wiecki Date: Sat, 10 Aug 2024 00:05:03 +0200 Subject: [PATCH 6/7] whitespace --- tests/test_config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_config.py b/tests/test_config.py index ac37072b13..98e098d76e 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -255,7 +255,7 @@ def test_config_pickling(): in_c_key=False, ) with pytest.raises( - AttributeError, + AttributeError, match="Can't pickle local object 'test_config_pickling..'", ): pickle.dump(root, io.BytesIO()) From a28b55cd1377872f261d330a7e1e92bcec7d5fc1 Mon Sep 17 00:00:00 2001 From: Thomas Wiecki Date: Sat, 10 Aug 2024 11:29:42 +0200 Subject: [PATCH 7/7] Update tests/test_config.py --- tests/test_config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_config.py b/tests/test_config.py index 98e098d76e..73c1408e03 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -256,7 +256,7 @@ def test_config_pickling(): ) with pytest.raises( AttributeError, - match="Can't pickle local object 'test_config_pickling..'", + match="Can't (pickle|get) local object 'test_config_pickling..'", ): pickle.dump(root, io.BytesIO())