diff options
author | Chris Withers <chris@simplistix.co.uk> | 2023-06-12 09:16:31 +0100 |
---|---|---|
committer | Chris Withers <chris@withers.org> | 2023-06-15 08:09:10 +0100 |
commit | 8a48793ed626cb7af42f99223ad3099caa55fd91 (patch) | |
tree | 0f95ec13b7a59e9279fedb9a9a0589dba0fd82af | |
parent | f8cefdbcd82f8780b811c69d9e305edd2df35b8b (diff) | |
download | mock-8a48793ed626cb7af42f99223ad3099caa55fd91.tar.gz |
Change test expectation for Python 3.9 and earlier
Bugfixes outside the mock library are needed and no sensible route to backport
-rw-r--r-- | mock/tests/testmock.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/mock/tests/testmock.py b/mock/tests/testmock.py index 1584622..344813c 100644 --- a/mock/tests/testmock.py +++ b/mock/tests/testmock.py @@ -2334,6 +2334,10 @@ class MockTest(unittest.TestCase): pass mock = Mock(spec=Foo) for m in (mock.method, mock.class_method, mock.static_method): + if sys.version_info[:2] <= (3, 9) and m is not mock.method: + # class and static methods need bugfixes in cpython to work: + self.assertIsInstance(m, Mock) + continue self.assertIsInstance(m, AsyncMock) if __name__ == '__main__': |