mirror of
https://github.com/python/cpython.git
synced 2025-07-24 19:54:21 +00:00
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
This commit is contained in:
parent
c7dd3c7d87
commit
a46575a8f2
2 changed files with 30 additions and 27 deletions
|
@ -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()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue