diff --git a/pandas/tests/tseries/offsets/test_month.py b/pandas/tests/tseries/offsets/test_month.py index 4dd494d0872a1..36727e75efe77 100644 --- a/pandas/tests/tseries/offsets/test_month.py +++ b/pandas/tests/tseries/offsets/test_month.py @@ -61,7 +61,7 @@ def test_offset_whole_year(self): datetime(2008, 12, 31), ) - for base, exp_date in zip(dates[:-1], dates[1:]): + for base, exp_date in zip(dates[:-1], dates[1:], strict=True): assert_offset_equal(SemiMonthEnd(), base, exp_date) # ensure .apply_index works as expected @@ -312,7 +312,7 @@ def test_offset_whole_year(self): datetime(2008, 12, 15), ) - for base, exp_date in zip(dates[:-1], dates[1:]): + for base, exp_date in zip(dates[:-1], dates[1:], strict=True): assert_offset_equal(SemiMonthBegin(), base, exp_date) # ensure .apply_index works as expected diff --git a/pandas/tests/tseries/offsets/test_offsets.py b/pandas/tests/tseries/offsets/test_offsets.py index 3666342aef433..37cdf9d4e709d 100644 --- a/pandas/tests/tseries/offsets/test_offsets.py +++ b/pandas/tests/tseries/offsets/test_offsets.py @@ -649,6 +649,7 @@ def test_copy(self): "2008-01-02 00:00:00.001000000", "2008-01-02 00:00:00.000001000", ], + strict=True, ), ) def test_add(self, arithmatic_offset_type, expected, dt): @@ -670,6 +671,7 @@ def test_add(self, arithmatic_offset_type, expected, dt): "2008-01-01 23:59:59.999000000", "2008-01-01 23:59:59.999999000", ], + strict=True, ), ) def test_sub(self, arithmatic_offset_type, expected, dt): @@ -693,6 +695,7 @@ def test_sub(self, arithmatic_offset_type, expected, dt): "2008-01-02 00:00:00.008000000", "2008-01-02 00:00:00.000009000", ], + strict=True, ), ) 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): "2008-01-01 23:59:59.992000000", "2008-01-01 23:59:59.999991000", ], + strict=True, ), ) def test_mul_sub(self, arithmatic_offset_type, n, expected, dt): diff --git a/pyproject.toml b/pyproject.toml index 49bb49aab03c5..12a5633f136cc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -588,8 +588,6 @@ exclude = [ "pandas/tests/strings/test_strings.py" = ["B905"] "pandas/tests/test_algos.py" = ["B905"] "pandas/tests/test_sorting.py" = ["B905"] -"pandas/tests/tseries/offsets/test_month.py" = ["B905"] -"pandas/tests/tseries/offsets/test_offsets.py" = ["B905"] "pandas/tests/util/test_validate_kwargs.py" = ["B905"] "scripts/validate_unwanted_patterns.py" = ["B905"]