Skip to content

Commit ed5fd66

Browse files
STY: Added zip strict to pandas/tests/tseries (#63110)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 3508aae commit ed5fd66

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

pandas/tests/tseries/offsets/test_month.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def test_offset_whole_year(self):
6161
datetime(2008, 12, 31),
6262
)
6363

64-
for base, exp_date in zip(dates[:-1], dates[1:]):
64+
for base, exp_date in zip(dates[:-1], dates[1:], strict=True):
6565
assert_offset_equal(SemiMonthEnd(), base, exp_date)
6666

6767
# ensure .apply_index works as expected
@@ -312,7 +312,7 @@ def test_offset_whole_year(self):
312312
datetime(2008, 12, 15),
313313
)
314314

315-
for base, exp_date in zip(dates[:-1], dates[1:]):
315+
for base, exp_date in zip(dates[:-1], dates[1:], strict=True):
316316
assert_offset_equal(SemiMonthBegin(), base, exp_date)
317317

318318
# ensure .apply_index works as expected

pandas/tests/tseries/offsets/test_offsets.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -649,6 +649,7 @@ def test_copy(self):
649649
"2008-01-02 00:00:00.001000000",
650650
"2008-01-02 00:00:00.000001000",
651651
],
652+
strict=True,
652653
),
653654
)
654655
def test_add(self, arithmatic_offset_type, expected, dt):
@@ -670,6 +671,7 @@ def test_add(self, arithmatic_offset_type, expected, dt):
670671
"2008-01-01 23:59:59.999000000",
671672
"2008-01-01 23:59:59.999999000",
672673
],
674+
strict=True,
673675
),
674676
)
675677
def test_sub(self, arithmatic_offset_type, expected, dt):
@@ -693,6 +695,7 @@ def test_sub(self, arithmatic_offset_type, expected, dt):
693695
"2008-01-02 00:00:00.008000000",
694696
"2008-01-02 00:00:00.000009000",
695697
],
698+
strict=True,
696699
),
697700
)
698701
def test_mul_add(self, arithmatic_offset_type, n, expected, dt):
@@ -717,6 +720,7 @@ def test_mul_add(self, arithmatic_offset_type, n, expected, dt):
717720
"2008-01-01 23:59:59.992000000",
718721
"2008-01-01 23:59:59.999991000",
719722
],
723+
strict=True,
720724
),
721725
)
722726
def test_mul_sub(self, arithmatic_offset_type, n, expected, dt):

pyproject.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -588,8 +588,6 @@ exclude = [
588588
"pandas/tests/strings/test_strings.py" = ["B905"]
589589
"pandas/tests/test_algos.py" = ["B905"]
590590
"pandas/tests/test_sorting.py" = ["B905"]
591-
"pandas/tests/tseries/offsets/test_month.py" = ["B905"]
592-
"pandas/tests/tseries/offsets/test_offsets.py" = ["B905"]
593591
"pandas/tests/util/test_validate_kwargs.py" = ["B905"]
594592
"scripts/validate_unwanted_patterns.py" = ["B905"]
595593

0 commit comments

Comments
 (0)