[Bug 1720794] Re: Test for sortedness of all_timezones and common_timezones is missing
Dmitry Shachnev
mitya57 at gmail.com
Mon Oct 2 18:15:43 UTC 2017
You want the upstream project, not Ubuntu.
** Package changed: python-tz (Ubuntu) => pytz
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to python-tz in Ubuntu.
https://bugs.launchpad.net/bugs/1720794
Title:
Test for sortedness of all_timezones and common_timezones is missing
Status in pytz:
New
Bug description:
Fedora replaces the hard-coded list of timezones with one dynamically
read from /usr/share/zoneinfo (cf.
https://src.fedoraproject.org/rpms/pytz/blob/master/f/pytz-
zoneinfo.patch). This breaks the promise in python-tz's README.txt
that all_timezones and common_timezones are sorted, i. e. for example
on Fedora 25:
| [tim at passepartout ~]$ python2 -c 'from pytz import all_timezones, common_timezones; print all_timezones == sorted(all_timezones), common_timezones == sorted(common_timezones)'
| False False
| [tim at passepartout ~]$ python3 -c 'from pytz import all_timezones, common_timezones; print(all_timezones == sorted(all_timezones), common_timezones == sorted(common_timezones))'
| False False
| [tim at passepartout ~]$
This is not python-tz's fault, but it would be helpful if the test
suite would assert that all_timezones == sorted(all_timezones) &&
common_timezones == sorted(common_timezones) so that this becomes a
regression easier to detect.
To manage notifications about this bug go to:
https://bugs.launchpad.net/pytz/+bug/1720794/+subscriptions
More information about the foundations-bugs
mailing list