kopia lustrzana https://github.com/collective/icalendar
move renaming backports.zoneinfo.ZoneInfo to zoneinfo.ZoneInfo into conftest.py
rodzic
21211cc958
commit
b920876d8c
|
@ -1,13 +1,18 @@
|
|||
try:
|
||||
from backports import zoneinfo
|
||||
# we make the tests nicer
|
||||
class ZoneInfo(zoneinfo.ZoneInfo):
|
||||
def __repr__(self):
|
||||
return f"zoneinfo.ZoneInfo(key={repr(self.key)})"
|
||||
zoneinfo.ZoneInfo = ZoneInfo
|
||||
except ImportError:
|
||||
pass
|
||||
import os
|
||||
import pytest
|
||||
import icalendar
|
||||
import pytz
|
||||
from datetime import datetime
|
||||
from dateutil import tz
|
||||
try:
|
||||
import zoneinfo
|
||||
except ModuleNotFoundError:
|
||||
from backports import zoneinfo
|
||||
from icalendar.cal import Component, Calendar, Event, ComponentFactory
|
||||
from icalendar.timezone import tzp as _tzp
|
||||
from icalendar.timezone import TZP
|
||||
|
|
|
@ -14,15 +14,6 @@ import doctest
|
|||
import os
|
||||
import pytest
|
||||
import importlib
|
||||
try:
|
||||
from backports import zoneinfo
|
||||
# we make the tests nicer
|
||||
class ZoneInfo(zoneinfo.ZoneInfo):
|
||||
def __repr__(self):
|
||||
return f"zoneinfo.ZoneInfo(key={repr(self.key)})"
|
||||
zoneinfo.ZoneInfo = ZoneInfo
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
HERE = os.path.dirname(__file__) or "."
|
||||
ICALENDAR_PATH = os.path.dirname(HERE)
|
||||
|
|
Ładowanie…
Reference in New Issue