Skip to content

Commit ed8b05d

Browse files
committed
make the clock_event_loop test easier to read
1 parent 1d3cd51 commit ed8b05d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/test_simple_35.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -110,17 +110,17 @@ async def test_clock_loop_advance_time(clock_event_loop):
110110
"""
111111
Test the sliding time event loop fixture
112112
"""
113-
# a timeout for operations using advance_time
114-
NAP_TIME = 10
113+
# A task is created that will sleep some number of seconds
114+
SLEEP_TIME = 10
115115

116116
# create the task
117-
task = clock_event_loop.create_task(asyncio.sleep(NAP_TIME))
117+
task = clock_event_loop.create_task(asyncio.sleep(SLEEP_TIME))
118118
assert not task.done()
119119

120120
# start the task
121121
await clock_event_loop.advance_time(0)
122122
assert not task.done()
123123

124124
# process the timeout
125-
await clock_event_loop.advance_time(NAP_TIME)
125+
await clock_event_loop.advance_time(SLEEP_TIME)
126126
assert task.done()

0 commit comments

Comments
 (0)