Skip to content

TST/CLN: reuse float_frame fixture in tests\reshape\test_concat.py #26763

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 2 commits into from
Jun 10, 2019
Merged
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
split TestAppend::test_append
  • Loading branch information
simonjayhawkins committed Jun 10, 2019
commit fefd68c4126cd52daf2da29cb96ee46f4a68d894
5 changes: 3 additions & 2 deletions pandas/tests/reshape/test_concat.py
Original file line number Diff line number Diff line change
Expand Up @@ -758,7 +758,7 @@ def test_append(self, sort, float_frame):
mixed_appended.reindex(columns=['A', 'B', 'C', 'D']),
mixed_appended2.reindex(columns=['A', 'B', 'C', 'D']))

# append empty
def test_append_empty(self, float_frame):
empty = DataFrame()

appended = float_frame.append(empty)
Expand All @@ -769,11 +769,12 @@ def test_append(self, sort, float_frame):
tm.assert_frame_equal(float_frame, appended)
assert appended is not float_frame

# Overlap
def test_append_overlap_raises(self, float_frame):
msg = "Indexes have overlapping values"
with pytest.raises(ValueError, match=msg):
float_frame.append(float_frame, verify_integrity=True)

def test_append_new_columns(self):
# see gh-6129: new columns
df = DataFrame({'a': {'x': 1, 'y': 2}, 'b': {'x': 3, 'y': 4}})
row = Series([5, 6, 7], index=['a', 'b', 'c'], name='z')
Expand Down