Rename Transport.pause/resume to pause_reading/pause_writing. Also relax timeout in test_call_later().

This commit is contained in:
Guido van Rossum 2013-10-18 07:58:20 -07:00
parent 40b22d0661
commit 57497ad181
10 changed files with 33 additions and 33 deletions

View file

@ -676,15 +676,15 @@ class SelectorSocketTransportTests(unittest.TestCase):
test_utils.run_briefly(self.loop)
self.assertIsNone(fut.result())
def test_pause_resume(self):
def test_pause_resume_reading(self):
tr = _SelectorSocketTransport(
self.loop, self.sock, self.protocol)
self.assertFalse(tr._paused)
self.loop.assert_reader(7, tr._read_ready)
tr.pause()
tr.pause_reading()
self.assertTrue(tr._paused)
self.assertFalse(7 in self.loop.readers)
tr.resume()
tr.resume_reading()
self.assertFalse(tr._paused)
self.loop.assert_reader(7, tr._read_ready)
@ -1044,14 +1044,14 @@ class SelectorSslTransportTests(unittest.TestCase):
self.assertTrue(transport._waiter.done())
self.assertIs(exc, transport._waiter.exception())
def test_pause_resume(self):
def test_pause_resume_reading(self):
tr = self._make_one()
self.assertFalse(tr._paused)
self.loop.assert_reader(1, tr._on_ready)
tr.pause()
tr.pause_reading()
self.assertTrue(tr._paused)
self.assertFalse(1 in self.loop.readers)
tr.resume()
tr.resume_reading()
self.assertFalse(tr._paused)
self.loop.assert_reader(1, tr._on_ready)