Repository navigation
Remove more pytz compat code + regression fixes #1514
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -351,9 +351,8 @@ display a list of time-zones to the user. | |
| .. code-block:: pycon | ||
|
|
||
| >>> from datetime import datetime | ||
| >>> from babel.dates import _localize | ||
|
|
||
| >>> dt = _localize(tz, datetime(2007, 8, 15)) | ||
| >>> dt = datetime(2007, 8, 15, tzinfo=tz) | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| >>> get_timezone_name(dt, locale=Locale.parse('de_DE')) | ||
| 'Mitteleuropäische Sommerzeit' | ||
| >>> get_timezone_name(tz, locale=Locale.parse('de_DE')) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,7 +15,6 @@ | |
| reason="Issue 1092 is not applicable on Windows", | ||
| ) | ||
| def test_issue_1092(monkeypatch): | ||
| pytest.importorskip("pytz", reason="pytz is not installed") | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This test does not need pytz |
||
| monkeypatch.setenv("TZ", "/UTC") # Malformed timezone name. | ||
| with pytest.raises(LookupError): | ||
| get_localzone() | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I missed this in the other PR, I added a test for it.