summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_asyncio
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2015-02-15 11:58:23 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2015-02-15 11:58:23 (GMT)
commit85c3033670d493d17e633261793e83226a6a0f61 (patch)
tree322c4f4c779fd214926ab7bbdf04a87c46747b00 /Lib/test/test_asyncio
parenta25c542c476b84b30a7172d5b4f7e2c82330f6f4 (diff)
downloadcpython-85c3033670d493d17e633261793e83226a6a0f61.zip
cpython-85c3033670d493d17e633261793e83226a6a0f61.tar.gz
cpython-85c3033670d493d17e633261793e83226a6a0f61.tar.bz2
Use os.devnull instead of hardcoded '/dev/null'.
Diffstat (limited to 'Lib/test/test_asyncio')
-rw-r--r--Lib/test/test_asyncio/test_unix_events.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/test/test_asyncio/test_unix_events.py b/Lib/test/test_asyncio/test_unix_events.py
index 41249ff..dc0835c 100644
--- a/Lib/test/test_asyncio/test_unix_events.py
+++ b/Lib/test/test_asyncio/test_unix_events.py
@@ -295,7 +295,7 @@ class SelectorEventLoopUnixSocketTests(test_utils.TestCase):
def test_create_unix_connection_path_sock(self):
coro = self.loop.create_unix_connection(
- lambda: None, '/dev/null', sock=object())
+ lambda: None, os.devnull, sock=object())
with self.assertRaisesRegex(ValueError, 'path and sock can not be'):
self.loop.run_until_complete(coro)
@@ -308,14 +308,14 @@ class SelectorEventLoopUnixSocketTests(test_utils.TestCase):
def test_create_unix_connection_nossl_serverhost(self):
coro = self.loop.create_unix_connection(
- lambda: None, '/dev/null', server_hostname='spam')
+ lambda: None, os.devnull, server_hostname='spam')
with self.assertRaisesRegex(ValueError,
'server_hostname is only meaningful'):
self.loop.run_until_complete(coro)
def test_create_unix_connection_ssl_noserverhost(self):
coro = self.loop.create_unix_connection(
- lambda: None, '/dev/null', ssl=True)
+ lambda: None, os.devnull, ssl=True)
with self.assertRaisesRegex(
ValueError, 'you have to pass server_hostname when using ssl'):