@parametrize('cls', tables.mapped_classes)
def test_nonzero_autoincrement_ids(session, cls):
 if ('id' not in cls.__table__.c):
  return
 if (not cls.__table__.c.id.autoincrement):
  return
 try:
  util.get(session, cls, id=0)
 except NoResultFound:
  pass
 else:
  pytest.fail(('No zero id in %s' % cls.__name__))

@ parametrize ( 'cls' , tables . mapped_classes ) def test_nonzero_autoincrement_ids ( session , cls ) : if ( 'id' not in cls . __table__ . c ) : return if ( not cls . __table__ . c . id . autoincrement ) : return try : util . get ( session , cls , id = 0 ) except NoResultFound : pass else : pytest . fail ( ( 'No zero id in %s' % cls . __name__ ) )
check that autoincrementing ids dont contain zeroes mysql doesnt like these .