[Python-modules-team] Bug#629699: webhelpers: FTBFS: test_distance_of_time_in_words fails.
Jakub Wilk
jwilk at debian.org
Mon Jul 4 18:10:44 UTC 2011
tags 629699 + confirmed
thanks
* Didier Raboud <odyx at debian.org>, 2011-06-08, 17:13:
>> self.assertEqual("11 months and 30 days", distance_of_time_in_words(0, 31536000))
>>AssertionError: '11 months and 30 days' != '11 months and 29 days'
Indeed, distance_of_time_in_words returns different values depending on
the current time (and timezone):
$ export TZ=Europe/Warsaw
$ for d in 01-01 03-01 03-02 03-27 04-02 10-30; do faketime "2011-$d UTC" python -c 'import webhelpers.date as d; print d.distance_of_time_in_words(0, 31536000)'; done
1 year
11 months and 28 days
11 months and 30 days
11 months, 30 days and 1 hour
11 months and 29 days
11 months, 29 days and 23 hours
--
Jakub Wilk
More information about the Python-modules-team
mailing list