Skip to content

Commit f3efb64

Browse files
committed
remove ValueError from ClockEventLoop.advance_time in favor of returnning immediately
1 parent 1a8b887 commit f3efb64

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pytest_asyncio/plugin.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,8 @@ async def advance_time(self, seconds):
212212
Advance time by a given offset in seconds.
213213
'''
214214
if seconds < 0:
215-
raise ValueError('cannot go backwards in time')
215+
# cannot go backwards in time, so return immediately
216+
return
216217

217218
# advance the clock by the given offset
218219
self._offset += seconds

0 commit comments

Comments
 (0)