summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_asyncio
diff options
context:
space:
mode:
authorYury Selivanov <yury@magic.io>2016-11-15 20:27:23 (GMT)
committerYury Selivanov <yury@magic.io>2016-11-15 20:27:23 (GMT)
commit21bb0e6f552c65b1f4128a7468021c0941bc6c18 (patch)
tree13a4a20935621bfb9b31e5238ea42219c74cf9f1 /Lib/test/test_asyncio
parent27182bb23229b61edbb40bd321cfdc183065afc4 (diff)
parentd7c151871e4eb445676fbd18bc5cb31406cccdf6 (diff)
downloadcpython-21bb0e6f552c65b1f4128a7468021c0941bc6c18.zip
cpython-21bb0e6f552c65b1f4128a7468021c0941bc6c18.tar.gz
cpython-21bb0e6f552c65b1f4128a7468021c0941bc6c18.tar.bz2
Merge 3.5 (issue #28704)
Diffstat (limited to 'Lib/test/test_asyncio')
-rw-r--r--Lib/test/test_asyncio/test_unix_events.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/Lib/test/test_asyncio/test_unix_events.py b/Lib/test/test_asyncio/test_unix_events.py
index 89c6eed..5a49984 100644
--- a/Lib/test/test_asyncio/test_unix_events.py
+++ b/Lib/test/test_asyncio/test_unix_events.py
@@ -4,6 +4,7 @@ import collections
import errno
import io
import os
+import pathlib
import signal
import socket
import stat
@@ -251,6 +252,15 @@ class SelectorEventLoopUnixSocketTests(test_utils.TestCase):
srv.close()
self.loop.run_until_complete(srv.wait_closed())
+ @unittest.skipUnless(hasattr(os, 'fspath'), 'no os.fspath')
+ def test_create_unix_server_pathlib(self):
+ with test_utils.unix_socket_path() as path:
+ path = pathlib.Path(path)
+ srv_coro = self.loop.create_unix_server(lambda: None, path)
+ srv = self.loop.run_until_complete(srv_coro)
+ srv.close()
+ self.loop.run_until_complete(srv.wait_closed())
+
def test_create_unix_server_existing_path_nonsock(self):
with tempfile.NamedTemporaryFile() as file:
coro = self.loop.create_unix_server(lambda: None, file.name)