Skip to content

Commit 820664c

Browse files
bmcfeejreback
authored andcommitted
moved deepcopy test to generic.py
1 parent 9721041 commit 820664c

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

pandas/tests/frame/test_misc_api.py

-9
Original file line numberDiff line numberDiff line change
@@ -332,15 +332,6 @@ def test_deepcopy(self):
332332
for idx, value in compat.iteritems(series):
333333
self.assertNotEqual(self.frame['A'][idx], value)
334334

335-
def test_deepcopy_empty(self):
336-
# This test covers empty frame copying with non-empty column sets
337-
# as reported in issue #15370
338-
# https://github.com/pandas-dev/pandas/issues/15370
339-
empty_frame = DataFrame(data=[], index=[], columns=['A'])
340-
empty_frame_copy = deepcopy(empty_frame)
341-
342-
self.assertEqual(empty_frame, empty_frame_copy)
343-
344335
# ---------------------------------------------------------------------
345336
# Transposing
346337

pandas/tests/test_generic.py

+10
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# pylint: disable-msg=E1101,W0612
33

44
from operator import methodcaller
5+
from copy import deepcopy
56
import pytest
67
import numpy as np
78
from numpy import nan
@@ -1539,6 +1540,15 @@ def test_to_xarray(self):
15391540
expected,
15401541
check_index_type=False)
15411542

1543+
def test_deepcopy_empty(self):
1544+
# This test covers empty frame copying with non-empty column sets
1545+
# as reported in issue #15370
1546+
# https://github.com/pandas-dev/pandas/issues/15370
1547+
empty_frame = DataFrame(data=[], index=[], columns=['A'])
1548+
empty_frame_copy = deepcopy(empty_frame)
1549+
1550+
self.assertEqual(empty_frame, empty_frame_copy)
1551+
15421552

15431553
class TestPanel(tm.TestCase, Generic):
15441554
_typ = Panel

0 commit comments

Comments
 (0)