Skip to content

Commit d0a6e48

Browse files
committed
TST: Test invalid input to test_cast_1d_array_invalid_scalar
1 parent c4e635f commit d0a6e48

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pandas/tests/dtypes/test_cast.py

+4
Original file line numberDiff line numberDiff line change
@@ -418,3 +418,7 @@ def test_cast_1d_array(self, datum1, datum2):
418418
# Direct comparison fails: https://github.com/numpy/numpy/issues/10218
419419
assert result.dtype == 'object'
420420
assert list(result) == data
421+
422+
@pytest.mark.parametrize('val', [1, 2., None])
423+
def test_cast_1d_array_invalid_scalar(self, val):
424+
pytest.raises(TypeError, construct_1d_object_array_from_listlike, val)

0 commit comments

Comments
 (0)