mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
Rename Transport.pause/resume to pause_reading/pause_writing. Also relax timeout in test_call_later().
This commit is contained in:
parent
40b22d0661
commit
57497ad181
10 changed files with 33 additions and 33 deletions
|
@ -375,21 +375,21 @@ class UnixReadPipeTransportTests(unittest.TestCase):
|
|||
m_logexc.assert_called_with('Fatal error for %s', tr)
|
||||
|
||||
@unittest.mock.patch('os.read')
|
||||
def test_pause(self, m_read):
|
||||
def test_pause_reading(self, m_read):
|
||||
tr = unix_events._UnixReadPipeTransport(
|
||||
self.loop, self.pipe, self.protocol)
|
||||
|
||||
m = unittest.mock.Mock()
|
||||
self.loop.add_reader(5, m)
|
||||
tr.pause()
|
||||
tr.pause_reading()
|
||||
self.assertFalse(self.loop.readers)
|
||||
|
||||
@unittest.mock.patch('os.read')
|
||||
def test_resume(self, m_read):
|
||||
def test_resume_reading(self, m_read):
|
||||
tr = unix_events._UnixReadPipeTransport(
|
||||
self.loop, self.pipe, self.protocol)
|
||||
|
||||
tr.resume()
|
||||
tr.resume_reading()
|
||||
self.loop.assert_reader(5, tr._read_ready)
|
||||
|
||||
@unittest.mock.patch('os.read')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue