mirror of
https://github.com/python/cpython.git
synced 2025-11-02 03:01:58 +00:00
asyncio: Truncate to 80 columns
This commit is contained in:
parent
8d9c145f61
commit
15cc678d89
12 changed files with 60 additions and 33 deletions
|
|
@ -285,7 +285,8 @@ class BaseEventLoopTests(test_utils.TestCase):
|
|||
@mock.patch('asyncio.base_events.logger')
|
||||
def test__run_once_logging(self, m_logger):
|
||||
def slow_select(timeout):
|
||||
# Sleep a bit longer than a second to avoid timer resolution issues.
|
||||
# Sleep a bit longer than a second to avoid timer resolution
|
||||
# issues.
|
||||
time.sleep(1.1)
|
||||
return []
|
||||
|
||||
|
|
@ -1217,14 +1218,16 @@ class BaseEventLoopWithSelectorTests(test_utils.TestCase):
|
|||
self.loop.run_forever()
|
||||
fmt, *args = m_logger.warning.call_args[0]
|
||||
self.assertRegex(fmt % tuple(args),
|
||||
"^Executing <Handle.*stop_loop_cb.*> took .* seconds$")
|
||||
"^Executing <Handle.*stop_loop_cb.*> "
|
||||
"took .* seconds$")
|
||||
|
||||
# slow task
|
||||
asyncio.async(stop_loop_coro(self.loop), loop=self.loop)
|
||||
self.loop.run_forever()
|
||||
fmt, *args = m_logger.warning.call_args[0]
|
||||
self.assertRegex(fmt % tuple(args),
|
||||
"^Executing <Task.*stop_loop_coro.*> took .* seconds$")
|
||||
"^Executing <Task.*stop_loop_coro.*> "
|
||||
"took .* seconds$")
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue