Skip to content

Commit

Permalink
fix tests for Python < 3.10
Browse files Browse the repository at this point in the history
  • Loading branch information
PythonFZ committed Nov 7, 2022
1 parent e38cdc0 commit 1ebd121
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_AutomaticInit.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1ebd121

Please sign in to comment.