Page MenuHomePhabricator

Tests don't work on first/last day of a month
Closed, ResolvedPublic

Description

Some timestamp tests won't work on the last day of a month and probably also not on the first day:

https://integration.wikimedia.org/ci/job/pywikibot-core-tox-nose/2267/console

  • TestTimestamp.test_add_timedelta will fail on the last day
  • TestTimestamp.test_sub_timedelta should fail on the first day

But I'm not sure what the best way to fix this is, without simply disabling them. One way to disable them only on the last/first day is, to compare the months of t2 and t1 and skip them if they are different.

Event Timeline

XZise raised the priority of this task from to Needs Triage.
XZise updated the task description. (Show Details)
XZise changed Security from none to None.
XZise added projects: Pywikibot, Pywikibot-tests.
XZise subscribed.

Change 176501 had a related patch set uploaded (by XZise):
[FIX] Tests: Skip timestamp tests if month changes

https://gerrit.wikimedia.org/r/176501

Patch-For-Review

Change 176501 merged by jenkins-bot:
Fix timestamp tests if month changes

https://gerrit.wikimedia.org/r/176501

XZise removed a project: Patch-For-Review.