def test_gp_new_generation():
 tpot_obj = TPOTClassifier()
 tpot_obj._pbar = tqdm(total=1, disable=True)
 assert (tpot_obj._gp_generation == 0)
 @_gp_new_generation
 def dummy_function(self, foo):
  pass
 dummy_function(tpot_obj, None)
 assert (tpot_obj._gp_generation == 1)

def test_gp_new_generation ( ) : tpot_obj = TPOTClassifier ( ) tpot_obj . _pbar = tqdm ( total = 1 , disable = True ) assert ( tpot_obj . _gp_generation == 0 ) @ _gp_new_generation def dummy_function ( self , foo ) : pass dummy_function ( tpot_obj , None ) assert ( tpot_obj . _gp_generation == 1 )
assert that the gp_generation count gets incremented when _gp_new_generation is called .