Improve FakeTime to be more easily usable

Bug #458924 reported by Henning Eggers
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
Low
Henning Eggers

Bug Description

The lp.testing.FakeTime class requires to explicitly give a start value and an increment for the advance method. To a test these values are most likely arbritary as long as the time is sure to be advancing.

The methods of FakeTime should provide default vaules. The actual current time can be used as a starting value and advances can be in milliseconds. Also, the advancement could be configured during init.

In addition, a nice "next_now" method should be provided to combine "now" and "advance" to produce a new, adavancing time value on each call.

Related branches

Revision history for this message
Henning Eggers (henninge) wrote :

Ah, I just found that lp.testing.time_counter does mostly what is described. Still, the improvement to FakeTime will help. too.

Changed in launchpad-foundations:
status: New → In Progress
Revision history for this message
Diogo Matsubara (matsubara) wrote : Bug fixed by a commit
Changed in launchpad-foundations:
status: In Progress → Fix Committed
Revision history for this message
Ursula Junque (ursinha) wrote : A commit mentioned this bug
tags: added: qa-needstesting
Revision history for this message
Ursula Junque (ursinha) wrote :
tags: added: qa-ok
removed: qa-needstesting
Changed in launchpad-foundations:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.