From 3d1777ffa9c084956296540e921554948363e0d3 Mon Sep 17 00:00:00 2001 From: Lumir Balhar Date: Tue, 15 Nov 2022 18:54:05 +0100 Subject: [PATCH] Compatibility with pytest 7.2+ --- python-pytest-mock.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/python-pytest-mock.spec b/python-pytest-mock.spec index b13fa82..cdaedbe 100644 --- a/python-pytest-mock.spec +++ b/python-pytest-mock.spec @@ -36,6 +36,8 @@ to worry about undoing patches at the end of a test. rm -rf *.egg-info # Correct end of line encoding for README sed -i 's/\r$//' README.rst +# Backport https://github.com/pytest-dev/pytest-mock/commit/e2016928db1147a2a46de6ee9fa878ca0e9d8fc8 +sed -i "s/import py\.code//" tests/test_pytest_mock.py %build %py3_build