Package: src:pyrcb2
Version: 0.6.2-2
Severity: important
Tags: sid trixie
User: [email protected]
Usertags: python3.12
pyrcb2's autopkg tests fail with Python 3.12:
[...]
252s === python3.12 ===
252s ============================= test session starts
==============================
252s platform linux -- Python 3.12.0+, pytest-7.4.3, pluggy-1.3.0
252s rootdir: /tmp/autopkgtest.2RAiQ9/autopkgtest_tmp
252s collected 36 items
252s
252s tests/test_accounts.py .........................
[ 69%]
252s tests/test_itypes.py F...F......
[100%]
252s
252s =================================== FAILURES
===================================
252s _________________________ TestItypes.test_idefaultdict
_________________________
252s
252s self = <tests.test_itypes.TestItypes testMethod=test_idefaultdict>
252s
252s def test_idefaultdict(self):
252s self.test_idict(cls=partial(IDefaultDict, None))
252s with self.assertRaises(TypeError):
252s IDefaultDict("test")
252s d = IDefaultDict(int)
252s self.assertEqual(d["test"], 0)
252s self.assertEqual(d["test"], 0)
252s expected_repr = "IDefaultDict(%r, [(IStr('test'), 0)])" % int
252s > self.assertEqual(repr(d), expected_repr)
252s E AssertionError: "IDefaultDict(<class 'int'>, {IStr('test'):
0})" != "IDefaultDict(<class 'int'>, [(IStr('test'), 0)])"
252s E - IDefaultDict(<class 'int'>, {IStr('test'): 0})
252s E ? ^ ^ ^
252s E + IDefaultDict(<class 'int'>, [(IStr('test'), 0)])
252s E ? ^^ ^ ^^
252s
252s tests/test_itypes.py:62: AssertionError
252s ____________________________ TestItypes.test_idict
_____________________________
252s
252s self = <tests.test_itypes.TestItypes testMethod=test_idict>
252s cls = <class 'pyrcb2.itypes.IDict'>
252s
252s def test_idict(self, cls=IDict):
252s d = cls(test=20)
252s d["Test^"] = 10
252s d["TEST~"] += 5
252s self.assertEqual(d["Test"], 20)
252s self.assertEqual(d["TEST~"], 15)
252s self.assertEqual(str(list(d.keys())[1]), "Test^")
252s if cls is IDict:
252s expected_repr = "IDict([(IStr('test'), 20),
(IStr('Test^'), 15)])"
252s > self.assertEqual(repr(d), expected_repr)
252s E AssertionError: "IDict({IStr('test'): 20,
IStr('Test^'): 15})" != "IDict([(IStr('test'), 20), (IStr('Test^'), 15)])"
252s E - IDict({IStr('test'): 20, IStr('Test^'): 15})
252s E ? ^ ^ ^ ^
252s E + IDict([(IStr('test'), 20), (IStr('Test^'), 15)])
252s E ? ^^ ^ + + ^ ^^
252s
252s tests/test_itypes.py:52: AssertionError
252s =============================== warnings summary
===============================
252s tests/test_accounts.py::TestAccountTracker::test_account_known
252s /tmp/autopkgtest.2RAiQ9/autopkgtest_tmp/tests/tests.py:90:
DeprecationWarning: There is no current event loop
252s loop = asyncio.get_event_loop()
252s
252s -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
252s =========================== short test summary info
============================
252s FAILED tests/test_itypes.py::TestItypes::test_idefaultdict -
AssertionError: ...
252s FAILED tests/test_itypes.py::TestItypes::test_idict -
AssertionError: "IDict(...
252s =================== 2 failed, 34 passed, 1 warning in 0.43s
====================