summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_asyncio/test_unix_events.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2014-07-29 21:08:00 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2014-07-29 21:08:00 (GMT)
commitf2ed889027f23ecf184a6ef52b7a7cc4921c3000 (patch)
tree5619b13a4d5d0f1862333fcdec614b6721fb75ae /Lib/test/test_asyncio/test_unix_events.py
parent3d4953a14b5b996432a8f8920d99f0ec1337b79e (diff)
downloadcpython-f2ed889027f23ecf184a6ef52b7a7cc4921c3000.zip
cpython-f2ed889027f23ecf184a6ef52b7a7cc4921c3000.tar.gz
cpython-f2ed889027f23ecf184a6ef52b7a7cc4921c3000.tar.bz2
asyncio: Use the new os.set_blocking() function of Python 3.5 if available
Diffstat (limited to 'Lib/test/test_asyncio/test_unix_events.py')
-rw-r--r--Lib/test/test_asyncio/test_unix_events.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/Lib/test/test_asyncio/test_unix_events.py b/Lib/test/test_asyncio/test_unix_events.py
index 099d4d5..e397598 100644
--- a/Lib/test/test_asyncio/test_unix_events.py
+++ b/Lib/test/test_asyncio/test_unix_events.py
@@ -306,9 +306,9 @@ class UnixReadPipeTransportTests(test_utils.TestCase):
self.pipe = mock.Mock(spec_set=io.RawIOBase)
self.pipe.fileno.return_value = 5
- fcntl_patcher = mock.patch('fcntl.fcntl')
- fcntl_patcher.start()
- self.addCleanup(fcntl_patcher.stop)
+ blocking_patcher = mock.patch('asyncio.unix_events._set_nonblocking')
+ blocking_patcher.start()
+ self.addCleanup(blocking_patcher.stop)
fstat_patcher = mock.patch('os.fstat')
m_fstat = fstat_patcher.start()
@@ -469,9 +469,9 @@ class UnixWritePipeTransportTests(test_utils.TestCase):
self.pipe = mock.Mock(spec_set=io.RawIOBase)
self.pipe.fileno.return_value = 5
- fcntl_patcher = mock.patch('fcntl.fcntl')
- fcntl_patcher.start()
- self.addCleanup(fcntl_patcher.stop)
+ blocking_patcher = mock.patch('asyncio.unix_events._set_nonblocking')
+ blocking_patcher.start()
+ self.addCleanup(blocking_patcher.stop)
fstat_patcher = mock.patch('os.fstat')
m_fstat = fstat_patcher.start()