Skip to content

Commit ba08846

Browse files
committed
TST: Add complex number in test_constructor_scalar_inference
1 parent ec14701 commit ba08846

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pandas/tests/test_frame.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1510,12 +1510,13 @@ def test_constructor_corner(self):
15101510

15111511
def test_constructor_scalar_inference(self):
15121512
data = {'int' : 1, 'bool' : True,
1513-
'float' : 3., 'object' : 'foo'}
1513+
'float' : 3., 'complex': 4j, 'object' : 'foo'}
15141514
df = DataFrame(data, index=np.arange(10))
15151515

15161516
self.assert_(df['int'].dtype == np.int64)
15171517
self.assert_(df['bool'].dtype == np.bool_)
15181518
self.assert_(df['float'].dtype == np.float64)
1519+
self.assert_(df['complex'].dtype == np.complex64)
15191520
self.assert_(df['object'].dtype == np.object_)
15201521

15211522
def test_constructor_DataFrame(self):

0 commit comments

Comments
 (0)