Skip to content

Commit

Permalink
match exact error message on test
Browse files Browse the repository at this point in the history
  • Loading branch information
KevsterAmp committed Oct 24, 2024
1 parent c6cb4b9 commit a616b29
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pandas/tests/series/accessors/test_str_accessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ def test_str_attribute(self):

# str accessor only valid with string values
ser = Series(range(5))
with pytest.raises(AttributeError, match="only use .str accessor"):
msg = "Can only use .str accessor with string values, not integer"
with pytest.raises(AttributeError, match=msg):
ser.str.repeat(2)

def test_str_accessor_updates_on_inplace(self):
Expand Down

0 comments on commit a616b29

Please sign in to comment.