Skip to content

Commit

Permalink
TST: use a few unused loop variables (pandas-dev#40752)
Browse files Browse the repository at this point in the history
  • Loading branch information
twoertwein authored Apr 2, 2021
1 parent c5e44c0 commit dc5a65c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions pandas/tests/indexes/datetimes/test_misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,7 @@ def test_datetime_name_accessors(self, time_locale):
for day, name, eng_name in zip(range(4, 11), expected_days, english_days):
name = name.capitalize()
assert dti.day_name(locale=time_locale)[day] == name
assert dti.day_name(locale=None)[day] == eng_name
ts = Timestamp(datetime(2016, 4, day))
assert ts.day_name(locale=time_locale) == name
dti = dti.append(DatetimeIndex([pd.NaT]))
Expand Down
2 changes: 1 addition & 1 deletion pandas/tests/indexes/period/test_indexing.py
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,7 @@ def test_where(self, klass):
def test_where_other(self):
i = period_range("20130101", periods=5, freq="D")
for arr in [np.nan, NaT]:
result = i.where(notna(i), other=np.nan)
result = i.where(notna(i), other=arr)
expected = i
tm.assert_index_equal(result, expected)

Expand Down
1 change: 1 addition & 0 deletions pandas/tests/series/accessors/test_dt_accessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,7 @@ def test_dt_accessor_datetime_name_accessors(self, time_locale):
for day, name, eng_name in zip(range(4, 11), expected_days, english_days):
name = name.capitalize()
assert s.dt.day_name(locale=time_locale)[day] == name
assert s.dt.day_name(locale=None)[day] == eng_name
s = s.append(Series([pd.NaT]))
assert np.isnan(s.dt.day_name(locale=time_locale).iloc[-1])

Expand Down

0 comments on commit dc5a65c

Please sign in to comment.