@@ -34,30 +34,30 @@ def test_pack():
3434
3535 x = - 255
3636 y = unpack (pack (x ))
37- assert_true (x == y and isinstance (y , int ) and not isinstance (y , np .ndarray ), "Native int did not match" )
37+ assert_true (x == y and isinstance (y , int ) and not isinstance (y , np .ndarray ), "Scalar int did not match" )
3838
3939 x = - 25523987234234287910987234987098245697129798713407812347
4040 y = unpack (pack (x ))
41- assert_true (x == y and isinstance (y , int ) and not isinstance (y , np .ndarray ), "Native int did not match" )
41+ assert_true (x == y and isinstance (y , int ) and not isinstance (y , np .ndarray ), "Unbounded int did not match" )
4242
4343 x = 7.
4444 y = unpack (pack (x ))
45- assert_true (x == y and isinstance (y , float ) and not isinstance (y , np .ndarray ), "Native float did not match" )
45+ assert_true (x == y and isinstance (y , float ) and not isinstance (y , np .ndarray ), "Scalar float did not match" )
4646
4747 x = 7j
4848 y = unpack (pack (x ))
49- assert_true (x == y and isinstance (y , complex ) and not isinstance (y , np .ndarray ), "Native complex did not match" )
49+ assert_true (x == y and isinstance (y , complex ) and not isinstance (y , np .ndarray ), "Complex scalar did not match" )
5050
5151 x = True
52- assert_true (unpack (pack (x )) is True , "Native bool did not match" )
52+ assert_true (unpack (pack (x )) is True , "Scalar bool did not match" )
5353
5454 x = [None ]
5555 assert_list_equal (x , unpack (pack (x )))
5656
5757 x = {'name' : 'Anonymous' , 'age' : 15 , 99 : datetime .now (), 'range' : [110 , 190 ], (11 , 12 ): None }
5858 y = unpack (pack (x ))
5959 assert_dict_equal (x , y , "Dict do not match!" )
60- assert_false (isinstance (['range' ][0 ], np .ndarray ), "Python-native scalars did not match ." )
60+ assert_false (isinstance (['range' ][0 ], np .ndarray ), "Scalar int was coerced into arrray ." )
6161
6262 x = uuid .uuid4 ()
6363 assert_equal (x , unpack (pack (x )), 'UUID did not match' )
0 commit comments