#NEWLINE# def pytest_generate_tests( metafunc ) : #NEWLINE# #INDENT# param_names = [ 'variant' , 'ctor_args' , 'offset' ] #NEWLINE# cases = { #NEWLINE# #INDENT# 'BruteForce' : ( 'CollisionManagerBruteForce' , [ ] , ( 2.2 , 3.7 ) ) , #NEWLINE# "Grid, target don't crosses bucket edges" : ( 'CollisionManagerGrid' , [ 0.0 , 100.0 , 0.0 , 100.0 , 4.0 , 4.0 ] , ( 2.0 , 2.0 ) ) , #NEWLINE# 'Grid, target crosses horizontal bucket edge' : ( 'CollisionManagerGrid' , [ 0.0 , 100.0 , 0.0 , 100.0 , 4.0 , 4.0 ] , ( 2.0 , 4.0 ) ) , #NEWLINE# 'Grid, target crosses vertical bucket edge' : ( 'CollisionManagerGrid' , [ 0.0 , 100.0 , 0.0 , 100.0 , 4.0 , 4.0 ] , ( 4.0 , 2.0 ) ) , #NEWLINE# 'Grid, target crosses vertical and horizontal bucket edges' : ( 'CollisionManagerGrid' , [ 0.0 , 100.0 , 0.0 , 100.0 , 4.0 , 4.0 ] , ( 4.0 , 4.0 ) ) , #NEWLINE# 'Grid, target bigger than cell' : ( 'CollisionManagerGrid' , [ 0.0 , 100.0 , 0.0 , 100.0 , 0.5 , 0.5 ] , ( 2.0 , 2.0 ) ) , #NEWLINE# #UNINDENT# } #NEWLINE# for name in cases : #NEWLINE# #INDENT# metafunc . addcall ( id = param_names , funcargs = dict ( zip ( param_names , cases [ name ] ) ) )