Package: src:qstylizer
Version: 0.2.2-1
Severity: important
Tags: sid trixie
User: debian-pyt...@lists.debian.org
Usertags: python3.12

qstylizer's autopkg tests fail with Python 3.12:

[...]
177s autopkgtest [19:03:16]: test pytest: [-----------------------
177s Testing with python3.12:
178s ============================= test session starts ==============================
178s platform linux -- Python 3.12.0+, pytest-7.4.3, pluggy-1.3.0
178s rootdir: /tmp/autopkgtest.JQ9ibf/autopkgtest_tmp
178s plugins: mock-3.11.1
178s collected 70 items
178s
178s test/integration/test_integration.py .......................... [ 37%] 178s test/unit/test_style.py .........................F.................. [100%]
178s
178s =================================== FAILURES =================================== 178s _________________________ test_create_child_rule_list __________________________
178s
178s mocker = <pytest_mock.plugin.MockerFixture object at 0x7efd34434cb0>
178s style_class = <class 'qstylizer.style.StyleRule'>, css = <StyleSheet />
178s
178s     def test_create_child_rule_list(mocker, style_class, css):
178s         import qstylizer.style
178s         style_list = "StyleListInstance"
178s         name = "test"
178s         mocker.patch.object(
178s             qstylizer.style, "StyleRuleList", return_value=style_list
178s         )
178s mocked_set_child_rule = mocker.patch.object(style_class, "set_child_rule")
178s         assert css.create_child_rule_list(name) == style_list
178s >       mocked_set_child_rule.called_once_with(name, style_list)
178s
178s test/unit/test_style.py:187:
178s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
178s
178s self = <MagicMock name='set_child_rule' id='139625967389008'>
178s name = 'called_once_with'
178s
178s     def __getattr__(self, name):
178s         if name in {'_mock_methods', '_mock_unsafe'}:
178s             raise AttributeError(name)
178s         elif self._mock_methods is not None:
178s             if name not in self._mock_methods or name in _all_magics:
178s raise AttributeError("Mock object has no attribute %r" % name)
178s         elif _is_magic(name):
178s             raise AttributeError(name)
178s if not self._mock_unsafe and (not self._mock_methods or name not in self._mock_methods): 178s if name.startswith(('assert', 'assret', 'asert', 'aseert', 'assrt')) or name in _ATTRIB_DENY_LIST:
178s >               raise AttributeError(
178s                     f"{name!r} is not a valid assertion. Use a spec "
178s f"for the mock if {name!r} is meant to be an attribute.") 178s E AttributeError: 'called_once_with' is not a valid assertion. Use a spec for the mock if 'called_once_with' is meant to be an attribute.. Did you mean: 'assert_called_once_with'?
178s
178s /usr/lib/python3.12/unittest/mock.py:663: AttributeError
178s =========================== short test summary info ============================ 178s FAILED test/unit/test_style.py::test_create_child_rule_list - AttributeError:... 178s ========================= 1 failed, 69 passed in 0.29s =========================

Reply via email to