What you are testing here is arithmetic. To check that the conversion of the values wraps, do something like
```
for code in 'bBhH':
    res = array(iinfo(code).max + 1, dtype=code)
    tgt = iinfo(code).min
    assert_(res == tgt)
```
For if 'iI' have less precision than 'lL', this should work for them also. For a plain old test of conversion, you can do
``` 
for code in typecodes['AllInteger']:
    res = array(iinfo(code).max, dtype=code)
    tgt = iinfo(code).max
    assert_(res == tgt)
```
You can also just test the scalar types
```
for code in typecodes['AllInteger']:
    res = typeDict[code](iinfo(code).max)
    tgt = iinfo(code).max
    assert_(res == tgt)
```
Checking the errors requires using numbers bigger than the c long type for long
```
In [24]: for code in ['lLqQ']:
    res = typeDict[code](iinfo(code).max + 1)
   ....: 
---------------------------------------------------------------------------
OverflowError                             Traceback (most recent call last)
/home/charris/<ipython-input-24-d96c0443d98a> in <module>()
      1 for code in ['l']:
----> 2     res = typeDict[code](iinfo(code).max + 1)

OverflowError: Python int too large to convert to C long
```
This should also fail for 'iI' types if long is the same size as int, something that can be checked using the max value from iinfo.