Skip to content

tests: Make test timezone-independent.

test_beautify_last_updated_timestamp tests the natural-language formatting of time.localtime(0), the Unix epoch in the local timezone. However, in timezones with a negative offset, that moment falls on a Wednesday, not a Thursday, so the assertions fail to match the expected string "Thursday".

Even though using a local timezone is appropriate for Pitivi itself, the test suite should not depend on the local timezone of the machine where it runs, so this change mocks time.localtime to return the Unix epoch in UTC.

Closes #2406 (closed).

Merge request reports