Skip to content

Commit 59597f3

Browse files
committed
restore broader test
1 parent b09a763 commit 59597f3

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

pandas/tests/frame/test_constructors.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2080,10 +2080,13 @@ def test_constructor_series_copy(self, float_frame):
20802080

20812081
assert not (series["A"] == 5).all()
20822082

2083-
def test_2d_object_array_does_not_copy(self):
2084-
arr = np.array([["a", "b"], ["c", "d"]], dtype="object")
2085-
df = DataFrame(arr)
2086-
assert np.shares_memory(df.values, arr)
2083+
def test_object_array_does_not_copy(self):
2084+
a = np.array(["a", "b"], dtype="object")
2085+
b = np.array([["a", "b"], ["c", "d"]], dtype="object")
2086+
df = DataFrame(a)
2087+
assert np.shares_memory(df.values, a)
2088+
df2 = DataFrame(b)
2089+
assert np.shares_memory(df2.values, b)
20872090

20882091
def test_constructor_with_nas(self):
20892092
# GH 5016

0 commit comments

Comments
 (0)