@@ -51,11 +51,26 @@ def test_invalid_types(self):
5151 # For now, display a deprecation warning for invalid
5252 # type sizes. In the future this should be changed
5353 # to an exception.
54- for typestr in ['O3' , 'O5' , 'O7' , 'b3' , 'h4' , 'I5' , 'l4' ,
55- 'L4' , 'q16' , 'Q16' , 'e3' , 'f5' , 'g12' ]:
54+
55+ for typestr in ['O3' , 'O5' , 'O7' , 'b3' , 'h4' , 'I5' ,
56+ 'e3' , 'f5' , 'g12' ]:
5657 #print typestr
5758 assert_warns (DeprecationWarning , np .dtype , typestr )
5859
60+ if np .dtype ('l' ).itemsize == 8 :
61+ assert_warns (DeprecationWarning , np .dtype , 'l4' )
62+ assert_warns (DeprecationWarning , np .dtype , 'L4' )
63+ else :
64+ assert_warns (DeprecationWarning , np .dtype , 'l8' )
65+ assert_warns (DeprecationWarning , np .dtype , 'L8' )
66+
67+ if np .dtype ('q' ).itemsize == 8 :
68+ assert_warns (DeprecationWarning , np .dtype , 'q4' )
69+ assert_warns (DeprecationWarning , np .dtype , 'Q4' )
70+ else :
71+ assert_warns (DeprecationWarning , np .dtype , 'q8' )
72+ assert_warns (DeprecationWarning , np .dtype , 'Q8' )
73+
5974 assert_raises (TypeError , np .dtype , 't8' , 'NA[u4,0xffffffff]' )
6075
6176 def test_bad_param (self ):
0 commit comments