[Bug 1720794] [NEW] Test for sortedness of all_timezones and common_timezones is missing
Tim Landscheidt
tim at tim-landscheidt.de
Mon Oct 2 13:32:31 UTC 2017
Public bug reported:
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.
** Affects: python-tz (Ubuntu)
Importance: Undecided
Status: New
--
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 python-tz package in Ubuntu:
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/ubuntu/+source/python-tz/+bug/1720794/+subscriptions
More information about the foundations-bugs
mailing list