Skip to content

Commit fdbcbea

Browse files
committed
Shift test to pandas/tests/frame/test_indexing.py
1 parent 551d855 commit fdbcbea

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

pandas/tests/frame/test_dtypes.py

-8
Original file line numberDiff line numberDiff line change
@@ -724,14 +724,6 @@ def test_astype_duplicate_col(self):
724724
expected = concat([a1_str, b, a2_str], axis=1)
725725
tm.assert_frame_equal(result, expected)
726726

727-
def test_wrong_length_cat_dtype_raises(self):
728-
# GH29523
729-
cat = pd.Categorical.from_codes([0, 1, 1, 0, 1, 2], ["a", "b", "c"])
730-
df = pd.DataFrame({"bar": range(10)})
731-
err = "Length of values does not match length of index"
732-
with pytest.raises(ValueError, match=err):
733-
df["foo"] = cat
734-
735727
@pytest.mark.parametrize(
736728
"dtype",
737729
[

pandas/tests/frame/test_indexing.py

+8
Original file line numberDiff line numberDiff line change
@@ -3856,3 +3856,11 @@ def test_functions_no_warnings(self):
38563856
df["group"] = pd.cut(
38573857
df.value, range(0, 105, 10), right=False, labels=labels
38583858
)
3859+
3860+
def test_wrong_length_cat_dtype_raises(self):
3861+
# GH29523
3862+
cat = pd.Categorical.from_codes([0, 1, 1, 0, 1, 2], ["a", "b", "c"])
3863+
df = pd.DataFrame({"bar": range(10)})
3864+
err = "Length of values does not match length of index"
3865+
with pytest.raises(ValueError, match=err):
3866+
df["foo"] = cat

0 commit comments

Comments
 (0)