Skip to content

Commit

Permalink
Fix PEP8 line length in tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
Liam3851 authored and TomAugspurger committed Feb 27, 2018
1 parent 656fd68 commit a28ef8f
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions pandas/tests/test_strings.py
Original file line number Diff line number Diff line change
Expand Up @@ -541,12 +541,15 @@ def test_replace_literal(self):
result = values.str.replace('f.', 'ba', regex=False)
tm.assert_series_equal(result, exp)

# Cannot do a literal replace if given a callable repl or compiled pattern
# Cannot do a literal replace if given a callable repl or compiled
# pattern
callable_repl = lambda m: m.group(0).swapcase()
compiled_pat = re.compile('[a-z][A-Z]{2}')

pytest.raises(ValueError, values.str.replace, 'abc', callable_repl, regex=False)
pytest.raises(ValueError, values.str.replace, compiled_pat, '', regex=False)
pytest.raises(ValueError, values.str.replace, 'abc', callable_repl,
regex=False)
pytest.raises(ValueError, values.str.replace, compiled_pat, '',
regex=False)

def test_repeat(self):
values = Series(['a', 'b', NA, 'c', NA, 'd'])
Expand Down

0 comments on commit a28ef8f

Please sign in to comment.