Skip to content

Commit 988e21f

Browse files
committed
TST: test behavior of passing None to Series constructor
1 parent 5a1bb27 commit 988e21f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

pandas/tests/test_series.py

+7
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,13 @@ def test_constructor_corner(self):
222222
s = Series(objs, index=[0, 1])
223223
self.assert_(isinstance(s, Series))
224224

225+
def test_constructor_pass_none(self):
226+
s = Series(None, index=range(5))
227+
self.assert_(s.dtype == np.float64)
228+
229+
s = Series(None, index=range(5), dtype=object)
230+
self.assert_(s.dtype == np.object_)
231+
225232
def test_constructor_cast(self):
226233
self.assertRaises(ValueError, Series, ['a', 'b', 'c'], dtype=float)
227234

0 commit comments

Comments
 (0)