- Revision
- 11329
- Author
- dan
- Date
- 2006-08-04 13:30:17 -0700 (Fri, 04 Aug 2006)
Log Message
For new test framework change TestNewEvent to use current Monday's date rather than today. This works around problems this test has had when run on Friday and Saturday.
Modified Paths
Diff
Modified: trunk/chandler/tools/cats/Functional/TestNewEvent.py (11328 => 11329)
--- trunk/chandler/tools/cats/Functional/TestNewEvent.py 2006-08-04 20:24:54 UTC (rev 11328) +++ trunk/chandler/tools/cats/Functional/TestNewEvent.py 2006-08-04 20:30:17 UTC (rev 11329) @@ -26,9 +26,10 @@ def startTest(self): def todayPlus(inc=0): - """return a m/d/yy date string equal to today plus inc days""" + """return a m/d/yy date string equal to this Monday plus inc days""" today = datetime.date.today() - incDay = today + datetime.timedelta(days=inc) + monday = today - datetime.timedelta(days=today.weekday()) + incDay = monday + datetime.timedelta(days=inc) y, m, d = incDay.timetuple()[:3] return '%s/%s/%s' % (m, d, str(y)[2:].zfill(2))
_______________________________________________ Commits mailing list [email protected] http://lists.osafoundation.org/mailman/listinfo/commits
