Skip to content

Commit

Permalink
Fixing pandas/tests/indexes/datetimes/test_ops.py to utilize python3 …
Browse files Browse the repository at this point in the history
…format strings. (#30420)
  • Loading branch information
AncientRickles authored and WillAyd committed Dec 23, 2019
1 parent d0bb009 commit 6df408b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pandas/tests/indexes/datetimes/test_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ def test_ops_properties_basic(self):

# sanity check that the behavior didn't change
# GH#7206
msg = "'Series' object has no attribute '{}'"
for op in ["year", "day", "second", "weekday"]:
with pytest.raises(AttributeError, match=msg.format(op)):
msg = f"'Series' object has no attribute '{op}'"
with pytest.raises(AttributeError, match=msg):
getattr(self.dt_series, op)

# attribute access should still work!
Expand Down

0 comments on commit 6df408b

Please sign in to comment.