Skip to content

Commit

Permalink
TST: Test invalid input to test_cast_1d_array_invalid_scalar
Browse files Browse the repository at this point in the history
  • Loading branch information
toobaz committed Dec 19, 2017
1 parent c4e635f commit d0a6e48
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pandas/tests/dtypes/test_cast.py
Original file line number Diff line number Diff line change
Expand Up @@ -418,3 +418,7 @@ def test_cast_1d_array(self, datum1, datum2):
# Direct comparison fails: https://github.com/numpy/numpy/issues/10218
assert result.dtype == 'object'
assert list(result) == data

@pytest.mark.parametrize('val', [1, 2., None])
def test_cast_1d_array_invalid_scalar(self, val):
pytest.raises(TypeError, construct_1d_object_array_from_listlike, val)

0 comments on commit d0a6e48

Please sign in to comment.