def test_laxparsers():

    p1 = datetimeparser('%Y-%m-%dT%H:%M:%S')
    try:
        p1('2002-12-25 00:00:00')
    except ValueError:
        pass
    else:
        assert False, 'expected exception'

    p2 = datetimeparser('%Y-%m-%dT%H:%M:%S', strict=False)
    try:
        v = p2('2002-12-25 00:00:00')
    except __HOLE__:
        assert False, 'did not expect exception'
    else:
        eq_('2002-12-25 00:00:00', v)
dataset/ETHPy150Open alimanfoo/petl/petl/test/util/test_parsers.py/test_laxparsers