From 1ebd1217ab52dd7d068462cec5807acb43aab5b0 Mon Sep 17 00:00:00 2001 From: PythonFZ Date: Mon, 7 Nov 2022 10:52:45 +0100 Subject: [PATCH] fix tests for Python < 3.10 --- tests/test_AutomaticInit.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_AutomaticInit.py b/tests/test_AutomaticInit.py index a62f9bc..a101c76 100644 --- a/tests/test_AutomaticInit.py +++ b/tests/test_AutomaticInit.py @@ -86,12 +86,12 @@ def test_ChildPlainCls(): with pytest.raises(TypeError) as err: _ = ChildPlainCls(q=10) - assert err.value.args[0] == "ZnInit.__init__() got an unexpected keyword argument 'q'" + assert err.value.args[0].endswith("__init__() got an unexpected keyword argument 'q'") with pytest.raises(TypeError) as err: _ = ChildPlainCls(parameter=10, q=10) - assert err.value.args[0] == "ZnInit.__init__() got an unexpected keyword argument 'q'" + assert err.value.args[0].endswith("__init__() got an unexpected keyword argument 'q'") child = ChildPlainCls(parameter=10) assert child.parameter == 10