[Python-modules-team] Bug#861245: pytest-mock: needs a versioned b-d on python-mock
Sandro Tosi
morph at debian.org
Wed Apr 26 14:16:06 UTC 2017
Source: pytest-mock
Version: 1.3.0-1
Severity: important
Hello,
when backporting pytest-mock to Jessie, it FTBFS with the jessie version of
python-mock (1.0.1-3) with:
```
test_pytest_mock.py::test_assert_not_called_wrapper FAILED
=================================== FAILURES ===================================
________________________ test_assert_not_called_wrapper ________________________
mocker = <pytest_mock.MockFixture object at 0x7ffff59c4c90>
@pytest.mark.skipif(sys.version_info[:2] in [(3, 3), (3, 4)],
reason="assert_not_called not available in python 3.3 and 3.4")
def test_assert_not_called_wrapper(mocker):
stub = mocker.stub()
> stub.assert_not_called()
test_pytest_mock.py:364:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <MagicMock spec='function' id='140737314123216'>
name = 'assert_not_called'
def __getattr__(self, name):
if name == '_mock_methods':
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)
E AttributeError: Mock object has no attribute 'assert_not_called'
/usr/lib/python2.7/dist-packages/mock.py:667: AttributeError
!!!!!!!!!!!!!!!!!!!! Interrupted: stopping after 1 failures !!!!!!!!!!!!!!!!!!!!
================ 1 failed, 28 passed, 2 xfailed in 0.31 seconds ================
```
that went away when i used the bpo version of python-mock (2.0.0-3~bpo8+1) ;
that implies the unversioned b-d on python-mock is not enough, and that b-d
needs to have a proper version added
thanks,
sandro
-- System Information:
Debian Release: stretch/sid
APT prefers unstable
APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 4.0.0-2-amd64 (SMP w/1 CPU core)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
More information about the Python-modules-team
mailing list