Skip to content

Commit

Permalink
use capsys.readouterr() as named tuple (pandas-dev#24489)
Browse files Browse the repository at this point in the history
  • Loading branch information
simonjayhawkins authored and Pingviinituutti committed Feb 28, 2019
1 parent 7e53d1a commit 99023ee
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pandas/tests/series/test_duplicates.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,12 @@ def __init__(self, val):
def __ne__(self, other):
raise Exception("NEQ not supported")

li = [Foo(i) for i in range(5)]
s = Series(li, index=[i for i in range(5)])
_, err = capsys.readouterr()
with capsys.disabled():
li = [Foo(i) for i in range(5)]
s = Series(li, index=[i for i in range(5)])
s.is_unique
_, err = capsys.readouterr()
assert len(err) == 0
captured = capsys.readouterr()
assert len(captured.err) == 0


@pytest.mark.parametrize(
Expand Down

0 comments on commit 99023ee

Please sign in to comment.