summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2015-02-17 22:48:49 +0100
committerVictor Stinner <victor.stinner@gmail.com>2015-02-17 22:48:49 +0100
commitb60bad4ec86069d0a8edd0209b033a9afcc5d25a (patch)
tree692ce2313d8921ae775ccc30abb6770514a23e97
parent716ef6cd6054c27affa02c7b65ab717ce7356184 (diff)
downloadtrollius-git-b60bad4ec86069d0a8edd0209b033a9afcc5d25a.tar.gz
tests: Use os.devnull instead of hardcoded '/dev/null'.
Patch written by Serhiy Storchaka <storchaka@gmail.com>.
-rw-r--r--tests/test_unix_events.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/test_unix_events.py b/tests/test_unix_events.py
index 41249ff..dc0835c 100644
--- a/tests/test_unix_events.py
+++ b/tests/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'):