summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorYury Selivanov <yury@magic.io>2016-11-21 22:47:27 (GMT)
committerYury Selivanov <yury@magic.io>2016-11-21 22:47:27 (GMT)
commitdab05847385c14fe76773d30f75f2bdc5b2ab7e3 (patch)
treeb5c02f68478bbe05f6fa0c764c54941daa151129 /Lib/test
parent6c7fb55d4491327d07f7a33ce25498ac2e871818 (diff)
downloadcpython-dab05847385c14fe76773d30f75f2bdc5b2ab7e3.zip
cpython-dab05847385c14fe76773d30f75f2bdc5b2ab7e3.tar.gz
cpython-dab05847385c14fe76773d30f75f2bdc5b2ab7e3.tar.bz2
Issue #28652: Partially rollback previous changes
Allow AF_UNIX in create_server & create_connection
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_asyncio/test_base_events.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/Lib/test/test_asyncio/test_base_events.py b/Lib/test/test_asyncio/test_base_events.py
index 2a93923..3f1ec65 100644
--- a/Lib/test/test_asyncio/test_base_events.py
+++ b/Lib/test/test_asyncio/test_base_events.py
@@ -1047,22 +1047,20 @@ class BaseEventLoopWithSelectorTests(test_utils.TestCase):
MyProto, 'example.com', 80, sock=object())
self.assertRaises(ValueError, self.loop.run_until_complete, coro)
- @unittest.skipUnless(hasattr(socket, 'AF_UNIX'), 'no Unix sockets')
def test_create_connection_wrong_sock(self):
- sock = socket.socket(socket.AF_UNIX)
+ sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
with sock:
coro = self.loop.create_connection(MyProto, sock=sock)
with self.assertRaisesRegex(ValueError,
- 'A TCP Stream Socket was expected'):
+ 'A Stream Socket was expected'):
self.loop.run_until_complete(coro)
- @unittest.skipUnless(hasattr(socket, 'AF_UNIX'), 'no Unix sockets')
def test_create_server_wrong_sock(self):
- sock = socket.socket(socket.AF_UNIX)
+ sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
with sock:
coro = self.loop.create_server(MyProto, sock=sock)
with self.assertRaisesRegex(ValueError,
- 'A TCP Stream Socket was expected'):
+ 'A Stream Socket was expected'):
self.loop.run_until_complete(coro)
@unittest.skipUnless(hasattr(socket, 'SOCK_NONBLOCK'),