Opened 14 years ago

Closed 14 years ago

#1757 enhancement closed fixed (fixed)

Clean up test Clock and move it to a public location

Reported by: Jean-Paul Calderone Owned by:
Priority: normal Milestone:
Component: core Keywords:
Cc: Branch:

Description (last modified by radix)


Change History (6)

comment:1 Changed 14 years ago by Jean-Paul Calderone

Keywords: review added
Owner: changed from radix to Glyph

Ready for review in test-clock-1757

comment:2 Changed 14 years ago by Glyph

Keywords: review removed
Owner: changed from Glyph to Jean-Paul Calderone

The docstring for 'seconds' is inadequate; am I supposed to subclass and override this? Does it have any actual relationship to time.time()?

callLater has no docstring, and that seems pretty important.

Does this thing actually want to implement IReactorTime?

adjust does not document the type of its parameter. Also it doesn't really distinguish itself from advance very well.

Is there really a reason for _runUntilCurrent to be a separate method? It's only called in one place, and it's private.

If you want to merge as-is for compatibility reasons, go ahead: but please create some tickets for documenting this. We should probably have a document that explains the purpose and method for faking out both the reactor and the clock (and the fake reactor in Vertex's tests should move when Juice does, so perhaps that's a dependency too...)

comment:3 Changed 14 years ago by radix

Description: modified (diff)
Resolution: fixed
Status: newclosed

Fixed in r17029.

comment:4 Changed 14 years ago by Jean-Paul Calderone

Resolution: fixed
Status: closedreopened

Tests failed on Python 2.3, reverted at r17030

comment:5 Changed 14 years ago by Jean-Paul Calderone

Resolution: fixed
Status: reopenedclosed

(In [17032]) Merge test-clock-1757

Authors: exarkun, radix Reviewer: glyph, radix Fixes #1757

This adds a twisted.internet.task.Clock class which simulates time as an IReactor.callLater replacement. It is useful for unit tests.

comment:6 Changed 9 years ago by <automation>

Owner: Jean-Paul Calderone deleted
Note: See TracTickets for help on using tickets.