def test_numparser_strict():

    parsenumber = numparser(strict=True)
    assert parsenumber('1') == 1
    assert parsenumber('1.0') == 1.0
    assert parsenumber(str(maxint + 1)) == maxint + 1
    assert parsenumber('3+4j') == 3 + 4j
    try:
        parsenumber('aaa')
    except __HOLE__:
        pass  # expected
    else:
        assert False, 'expected exception'
    try:
        parsenumber(None)
    except TypeError:
        pass  # expected
    else:
        assert False, 'expected exception'
dataset/ETHPy150Open alimanfoo/petl/petl/test/util/test_parsers.py/test_numparser_strict