diff options
author | Chris Withers <chris@withers.org> | 2020-01-27 14:55:56 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-27 14:55:56 +0000 |
commit | a46575a8f2ded8b49e26c25bb67192e1500e76ca (patch) | |
tree | 4e6331742b11b7fbda4197118ec21793ae8dce11 /Lib/unittest/test/testmock/testmagicmethods.py | |
parent | c7dd3c7d87d6961756d99b57aa13db7c7a03e1f8 (diff) | |
download | cpython-git-a46575a8f2ded8b49e26c25bb67192e1500e76ca.tar.gz |
Clarify and fix assertions that mocks have not been awaited (GH-18196)
- The gc.collect is needed for other implementations, such as pypy
- Using context managers over multiple lines will only catch the warning from the first line in the context!
- remove a skip for a test that no longer fails on pypy
Diffstat (limited to 'Lib/unittest/test/testmock/testmagicmethods.py')
-rw-r--r-- | Lib/unittest/test/testmock/testmagicmethods.py | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/Lib/unittest/test/testmock/testmagicmethods.py b/Lib/unittest/test/testmock/testmagicmethods.py index 5690f7a6bb..a4feae7e9d 100644 --- a/Lib/unittest/test/testmock/testmagicmethods.py +++ b/Lib/unittest/test/testmock/testmagicmethods.py @@ -1,7 +1,6 @@ import math import unittest import os -import sys from asyncio import iscoroutinefunction from unittest.mock import AsyncMock, Mock, MagicMock, _magics @@ -429,7 +428,6 @@ class TestMockingMagicMethods(unittest.TestCase): self.assertEqual(dir(mock), ['foo']) - @unittest.skipIf('PyPy' in sys.version, "This fails differently on pypy") def test_bound_methods(self): m = Mock() |