summaryrefslogtreecommitdiff
path: root/Lib/test/test_asyncio/test_proactor_events.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2014-01-25 22:22:18 +0100
committerVictor Stinner <victor.stinner@gmail.com>2014-01-25 22:22:18 +0100
commit128ee220e21bd4e7eb152396ff24d879f38c5d91 (patch)
treecc445b03c4b76fdec0bab5bb1374826356f7a951 /Lib/test/test_asyncio/test_proactor_events.py
parentce8d153b0245d324735cdb72e4267f1dd9e52e1e (diff)
downloadcpython-git-128ee220e21bd4e7eb152396ff24d879f38c5d91.tar.gz
asyncio: Don't export BaseEventLoop, BaseSelectorEventLoop nor
BaseProactorEventLoop Import them from submodules if you really need them.
Diffstat (limited to 'Lib/test/test_asyncio/test_proactor_events.py')
-rw-r--r--Lib/test/test_asyncio/test_proactor_events.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/Lib/test/test_asyncio/test_proactor_events.py b/Lib/test/test_asyncio/test_proactor_events.py
index 1c628000c5..9964f425d2 100644
--- a/Lib/test/test_asyncio/test_proactor_events.py
+++ b/Lib/test/test_asyncio/test_proactor_events.py
@@ -5,6 +5,7 @@ import unittest
import unittest.mock
import asyncio
+from asyncio.proactor_events import BaseProactorEventLoop
from asyncio.proactor_events import _ProactorSocketTransport
from asyncio.proactor_events import _ProactorWritePipeTransport
from asyncio.proactor_events import _ProactorDuplexPipeTransport
@@ -344,18 +345,18 @@ class BaseProactorEventLoopTests(unittest.TestCase):
self.ssock, self.csock = unittest.mock.Mock(), unittest.mock.Mock()
- class EventLoop(asyncio.BaseProactorEventLoop):
+ class EventLoop(BaseProactorEventLoop):
def _socketpair(s):
return (self.ssock, self.csock)
self.loop = EventLoop(self.proactor)
- @unittest.mock.patch.object(asyncio.BaseProactorEventLoop, 'call_soon')
- @unittest.mock.patch.object(asyncio.BaseProactorEventLoop, '_socketpair')
+ @unittest.mock.patch.object(BaseProactorEventLoop, 'call_soon')
+ @unittest.mock.patch.object(BaseProactorEventLoop, '_socketpair')
def test_ctor(self, socketpair, call_soon):
ssock, csock = socketpair.return_value = (
unittest.mock.Mock(), unittest.mock.Mock())
- loop = asyncio.BaseProactorEventLoop(self.proactor)
+ loop = BaseProactorEventLoop(self.proactor)
self.assertIs(loop._ssock, ssock)
self.assertIs(loop._csock, csock)
self.assertEqual(loop._internal_fds, 1)
@@ -398,7 +399,7 @@ class BaseProactorEventLoopTests(unittest.TestCase):
def test_socketpair(self):
self.assertRaises(
- NotImplementedError, asyncio.BaseProactorEventLoop, self.proactor)
+ NotImplementedError, BaseProactorEventLoop, self.proactor)
def test_make_socket_transport(self):
tr = self.loop._make_socket_transport(self.sock, unittest.mock.Mock())