diff --git a/.gitignore b/.gitignore index ee679fb..d277b5c 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,8 @@ +/pytest-mock-1.1.zip +/pytest-mock-1.2.zip +/pytest-mock-1.6.0.tar.gz +/pytest-mock-1.6.2.tar.gz +/pytest-mock-1.6.3.tar.gz +/pytest-mock-1.7.0.tar.gz +/pytest-mock-1.7.1.tar.gz /pytest-mock-1.9.0.tar.gz diff --git a/fix-for-pytest3.patch b/fix-for-pytest3.patch new file mode 100644 index 0000000..0b243f8 --- /dev/null +++ b/fix-for-pytest3.patch @@ -0,0 +1,21 @@ +diff --git a/test_pytest_mock.py b/test_pytest_mock.py +index 1e47d0e..e54649a 100644 +--- a/test_pytest_mock.py ++++ b/test_pytest_mock.py +@@ -176,7 +176,7 @@ def __test_failure_message(self, mocker, **kwargs): + stub = mocker.stub(**kwargs) + with pytest.raises(AssertionError) as exc_info: + stub.assert_called_with() +- assert exc_info.value.msg == expected_message ++ assert str(exc_info.value) == expected_message + + def test_failure_message_with_no_name(self, mocker): + self.__test_failure_message(mocker) +@@ -352,7 +352,7 @@ def assert_argument_introspection(left, right): + # test was run by examining sys.argv + verbose = any(a.startswith('-v') for a in sys.argv) + expected = '\n '.join(util._compare_eq_iterable(left, right, verbose)) +- assert expected in e.msg ++ assert expected in str(e) + else: + raise AssertionError("DID NOT RAISE")