8000 TST: tests for needs-test issues #12857 #12689 by jbrockmendel · Pull Request #30327 · pandas-dev/pandas · GitHub
[go: up one dir, main page]

Skip to content

TST: tests for needs-test issues #12857 #12689 #30327

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Dec 24, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
TST: tests for needs-test issues #12857, #12689
  • Loading branch information
jbrockmendel committed Dec 18, 2019
commit 74fc0cc39fcaef1c162006268d1416d38190e260
7 changes: 7 additions & 0 deletions pandas/tests/frame/test_arithmetic.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@
class TestFrameComparisons:
# Specifically _not_ flex-comparisons

def test_frame_in_list(self):
# GH#12689 this should raise at the DataFrame level, not blocks
df = pd.DataFrame(np.random.randn(6,4), columns=list('ABCD'))
msg = "The truth value of a DataFrame is ambiguous"
with pytest.raises(ValueError, match=msg):
df in [None]

def test_comparison_invalid(self):
< 8000 /td> def check(df, df2):

Expand Down
12 changes: 12 additions & 0 deletions pandas/tests/frame/test_repr_info.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from datetime import datetime, timedelta
from io import StringIO
import random
import re
import sys
import textwrap
Expand Down Expand Up @@ -27,6 +28,17 @@


class TestDataFrameReprInfoEtc:

def test_repr_bytes_61_lines(self):
# GH#12857
lets = 'ACDEFGHIJKLMNOP'
slen = 50
nseqs = 1000
words = [[random.choice(lets) for x in range(slen)] for _ in range(nseqs)]
df = pd.DataFrame(words).astype('S1')
assert (df.dtypes == 'S1').all()
repr(df) # smoke test

def test_repr_empty(self):
# empty
foo = repr(DataFrame()) # noqa
Expand Down
0