Package: src:ipyparallel
Version: 7.1.0-5
Severity: serious
Tags: sid trixie ftbfs
User: debian-pyt...@lists.debian.org
Usertags: python3.12

With python3-defaults from experimental, the package fails to build:

[...]
=================================== FAILURES =================================== _____________________________ test_disambiguate_ip _____________________________

warn_mock = <MagicMock name='warn' id='140702045868912'>

    @mock.patch('warnings.warn')
    def test_disambiguate_ip(warn_mock):
        # garbage in, garbage out
        assert util.disambiguate_ip_address('garbage') == 'garbage'
assert util.disambiguate_ip_address('0.0.0.0', socket.gethostname()) == localhost()
        wontresolve = 'this.wontresolve.dns'
assert util.disambiguate_ip_address('0.0.0.0', wontresolve) == wontresolve
        assert warn_mock.called_once_with(
            'IPython could not determine IPs for {}: '
            '[Errno -2] Name or service not known'.format(wontresolve),
            RuntimeWarning,
>       )

ipyparallel/tests/test_util.py:21:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <MagicMock name='warn' id='140702045868912'>, name = 'called_once_with'

    def __getattr__(self, name):
        if name in {'_mock_methods', '_mock_unsafe'}:
            raise AttributeError(name)
        elif self._mock_methods is not None:
            if name not in self._mock_methods or name in _all_magics:
raise AttributeError("Mock object has no attribute %r" % name)
        elif _is_magic(name):
            raise AttributeError(name)
if not self._mock_unsafe and (not self._mock_methods or name not in self._mock_methods): if name.startswith(('assert', 'assret', 'asert', 'aseert', 'assrt')) or name in _ATTRIB_DENY_LIST:
>               raise AttributeError(
                    f"{name!r} is not a valid assertion. Use a spec "
f"for the mock if {name!r} is meant to be an attribute.") 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'?

/usr/lib/python3.12/unittest/mock.py:663: AttributeError

Reply via email to