TST: Fix RuntimeError: data type not supported on Python 2.6

On Python >=2.7, C extensions that use integer format codes with the PyArg_Parse* family of functions will raise a TypeError exception instead of triggering a DeprecationWarning (Python 2.6). The RuntimeError is raised by ndimage for unsupported array data types.
This commit is contained in:
cgohlke
2013-10-15 00:42:40 -07:00
parent 99ae582362
commit e75126a4d8
+2 -1
View File
@@ -31,7 +31,8 @@ def test_all_props():
def test_dtype():
regionprops(np.zeros((10, 10), dtype=np.int))
regionprops(np.zeros((10, 10), dtype=np.uint))
assert_raises(TypeError, regionprops, np.zeros((10, 10), dtype=np.double))
assert_raises((TypeError, RuntimeError), regionprops,
np.zeros((10, 10), dtype=np.double))
def test_ndim():