Skip to content

Commit

Permalink
create missing pytz.UnknownTimeZoneError
Browse files Browse the repository at this point in the history
  • Loading branch information
niccokunzmann committed Oct 9, 2024
1 parent 295d680 commit bc4521d
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/icalendar/tests/test_equality.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
import copy

try:
import pytz
from pytz import UnknownTimeZoneError
except ImportError:
pytz = None
class UnknownTimeZoneError(Exception):
pass
from datetime import date, datetime, time, timedelta

import pytest
Expand Down Expand Up @@ -82,9 +83,9 @@ def test_deep_copies_are_equal(ics_file, tzp):
Ignore errors when a custom time zone is used.
This is still covered by the parsing test.
"""
with contextlib.suppress(pytz.UnknownTimeZoneError):
with contextlib.suppress(UnknownTimeZoneError):
assert_equal(copy.deepcopy(ics_file), copy.deepcopy(ics_file))
with contextlib.suppress(pytz.UnknownTimeZoneError):
with contextlib.suppress(UnknownTimeZoneError):
assert_equal(copy.deepcopy(ics_file), ics_file)


Expand Down

0 comments on commit bc4521d

Please sign in to comment.