summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2015-01-29 17:32:39 +0100
committerVictor Stinner <victor.stinner@gmail.com>2015-01-29 17:32:39 +0100
commit190e78603a4ce58a2f248fdf8a3472fa1fc6c064 (patch)
tree0990f66b83b12d6466ba5042bfbb0b02442ab5e7 /tests
parenta1611f147decd003b0ffe5d10eb011d0b8c2725e (diff)
downloadtrollius-master.tar.gz
Python issue #23243: On Python 3.4 and newer, emit a ResourceWarning when anHEADmaster
event loop or a transport is not explicitly closed
Diffstat (limited to 'tests')
-rw-r--r--tests/test_proactor_events.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/test_proactor_events.py b/tests/test_proactor_events.py
index 33a8a67..fcd9ab1 100644
--- a/tests/test_proactor_events.py
+++ b/tests/test_proactor_events.py
@@ -499,8 +499,12 @@ class BaseProactorEventLoopTests(test_utils.TestCase):
self.proactor.accept.assert_called_with(self.sock)
def test_socketpair(self):
+ class EventLoop(BaseProactorEventLoop):
+ # override the destructor to not log a ResourceWarning
+ def __del__(self):
+ pass
self.assertRaises(
- NotImplementedError, BaseProactorEventLoop, self.proactor)
+ NotImplementedError, EventLoop, self.proactor)
def test_make_socket_transport(self):
tr = self.loop._make_socket_transport(self.sock, asyncio.Protocol())