Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/19870.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Stub.
7 changes: 6 additions & 1 deletion tests/unittest.py
Original file line number Diff line number Diff line change
Expand Up @@ -734,7 +734,12 @@ def pump(self, by: float = 0.0) -> None:
# second steps/increments. We assume this was done so that when you use the
# clock to schedule something that schedules more things, it tries to run the
# whole chain to completion.
self.reactor.pump([by] * 100)
for _ in range(100):
self.reactor.advance(by)
# Allow other threads to make progress. This is real sleep time so we don't
# want to actually sleep for the same amount of time someone wants to
# advance the Twisted clock for.
time.sleep(0)

def get_success(self, d: Awaitable[TV], by: float = 0.0) -> TV:
deferred: Deferred[TV] = ensureDeferred(d) # type: ignore[arg-type]
Expand Down
Loading