summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_asyncio/test_base_events.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2014-12-18 11:29:53 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2014-12-18 11:29:53 (GMT)
commitdc7765d12c8b3008935659d70970ac3cd563e566 (patch)
tree776af64cd2452f2ce9c905f3aac6cb112f5514b7 /Lib/test/test_asyncio/test_base_events.py
parent3a1c738e6cf09d0972809fa431bf77dd564ff713 (diff)
downloadcpython-dc7765d12c8b3008935659d70970ac3cd563e566.zip
cpython-dc7765d12c8b3008935659d70970ac3cd563e566.tar.gz
cpython-dc7765d12c8b3008935659d70970ac3cd563e566.tar.bz2
asyncio: sync with Tulip
Diffstat (limited to 'Lib/test/test_asyncio/test_base_events.py')
-rw-r--r--Lib/test/test_asyncio/test_base_events.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/Lib/test/test_asyncio/test_base_events.py b/Lib/test/test_asyncio/test_base_events.py
index db9d732..4e5b6ca 100644
--- a/Lib/test/test_asyncio/test_base_events.py
+++ b/Lib/test/test_asyncio/test_base_events.py
@@ -8,13 +8,17 @@ import sys
import time
import unittest
from unittest import mock
-from test.script_helper import assert_python_ok
-from test.support import IPV6_ENABLED, gc_collect
import asyncio
from asyncio import base_events
from asyncio import constants
from asyncio import test_utils
+try:
+ from test.script_helper import assert_python_ok
+ from test import support
+except ImportError:
+ from asyncio import test_support as support
+ from asyncio.test_support import assert_python_ok
MOCK_ANY = mock.ANY
@@ -634,7 +638,7 @@ class BaseEventLoopTests(test_utils.TestCase):
except KeyboardInterrupt:
pass
self.loop.close()
- gc_collect()
+ support.gc_collect()
self.assertFalse(self.loop.call_exception_handler.called)
@@ -1066,7 +1070,7 @@ class BaseEventLoopWithSelectorTests(test_utils.TestCase):
self.assertRaises(
OSError, self.loop.run_until_complete, coro)
- @unittest.skipUnless(IPV6_ENABLED, 'IPv6 not supported or enabled')
+ @unittest.skipUnless(support.IPV6_ENABLED, 'IPv6 not supported or enabled')
def test_create_datagram_endpoint_no_matching_family(self):
coro = self.loop.create_datagram_endpoint(
asyncio.DatagramProtocol,