We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hey!
Many tests are failing when running with pytest 3.0.1:
_____________________________ TestMockerStub.test_failure_message_with_no_name _____________________________ self = <test_pytest_mock.TestMockerStub instance at 0x7f0b7f55c758> mocker = <pytest_mock.MockFixture object at 0x7f0b7f51add0> def test_failure_message_with_no_name(self, mocker): > self.__test_failure_message(mocker) test_pytest_mock.py:182: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <test_pytest_mock.TestMockerStub instance at 0x7f0b7f55c758> mocker = <pytest_mock.MockFixture object at 0x7f0b7f51add0>, kwargs = {}, expected_name = 'mock' expected_message = 'Expected call: mock()\nNot called' stub = <MagicMock spec='function' id='139687357426384'>, exc_info = <ExceptionInfo AssertionError tblen=3> @py_assert1 = AssertionError('Expected call: mock()\nNot called',) def __test_failure_message(self, mocker, **kwargs): expected_name = kwargs.get('name') or 'mock' expected_message = 'Expected call: {0}()\nNot called'.format(expected_name) stub = mocker.stub(**kwargs) with pytest.raises(AssertionError) as exc_info: stub.assert_called_with() > assert exc_info.value.msg == expected_message E AttributeError: 'exceptions.AssertionError' object has no attribute 'msg' test_pytest_mock.py:179: AttributeError
The text was updated successfully, but these errors were encountered:
Thanks for reporting. I've rephrased the issue: it works with pytest 3 in general. A PR would be welcome, of course.
Sorry, something went wrong.
I'll do a PR shortly.
Fixed in #63
No branches or pull requests
Hey!
Many tests are failing when running with pytest 3.0.1:
The text was updated successfully, but these errors were encountered: