summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_zoneinfo
diff options
context:
space:
mode:
authorPaul Ganssle <paul@ganssle.io>2020-05-29 13:34:30 (GMT)
committerGitHub <noreply@github.com>2020-05-29 13:34:30 (GMT)
commit364b5ead1584583db91ef7f9d9f87f01bfbb5774 (patch)
tree00b94e01eeca21e816d79a16c31d6bb6e4897e04 /Lib/test/test_zoneinfo
parent895c9c1d438367722f74f437fda96767d770662b (diff)
downloadcpython-364b5ead1584583db91ef7f9d9f87f01bfbb5774.zip
cpython-364b5ead1584583db91ef7f9d9f87f01bfbb5774.tar.gz
cpython-364b5ead1584583db91ef7f9d9f87f01bfbb5774.tar.bz2
Further de-linting of zoneinfo module (#20499)
* Remove unused imports in zoneinfo * Remove unused variables in zoneinfo * Remove else after raise
Diffstat (limited to 'Lib/test/test_zoneinfo')
-rw-r--r--Lib/test/test_zoneinfo/test_zoneinfo.py11
1 files changed, 2 insertions, 9 deletions
diff --git a/Lib/test/test_zoneinfo/test_zoneinfo.py b/Lib/test/test_zoneinfo/test_zoneinfo.py
index fe2c380..1f1fa60 100644
--- a/Lib/test/test_zoneinfo/test_zoneinfo.py
+++ b/Lib/test/test_zoneinfo/test_zoneinfo.py
@@ -19,12 +19,7 @@ from datetime import date, datetime, time, timedelta, timezone
from functools import cached_property
from . import _support as test_support
-from ._support import (
- OS_ENV_LOCK,
- TZPATH_LOCK,
- TZPATH_TEST_LOCK,
- ZoneInfoTestBase,
-)
+from ._support import OS_ENV_LOCK, TZPATH_TEST_LOCK, ZoneInfoTestBase
py_zoneinfo, c_zoneinfo = test_support.get_modules()
@@ -365,7 +360,6 @@ class ZoneInfoTest(TzPathUserMixin, ZoneInfoTestBase):
self.assertEqual(dt.dst(), offset.dst, dt)
def test_folds_from_utc(self):
- tests = []
for key in self.zones():
zi = self.zone_from_key(key)
with self.subTest(key=key):
@@ -927,7 +921,7 @@ class TZStrTest(ZoneInfoTestBase):
# the Version 2+ file. In this case, we have no transitions, just
# the tzstr in the footer, so up to the footer, the files are
# identical and we can just write the same file twice in a row.
- for i in range(2):
+ for _ in range(2):
out += b"TZif" # Magic value
out += b"3" # Version
out += b" " * 15 # Reserved
@@ -952,7 +946,6 @@ class TZStrTest(ZoneInfoTestBase):
return self.klass.from_file(zonefile, key=tzstr)
def test_tzstr_localized(self):
- i = 0
for tzstr, cases in self.test_cases.items():
with self.subTest(tzstr=tzstr):
zi = self.zone_from_tzstr(tzstr)