def pytest_generate_tests(metafunc):
 test_files = dict(map(parse_test_files_option, metafunc.config.option.test_files))
 if ('case' in metafunc.fixturenames):
  base_dir = metafunc.config.option.integration_case_dir
  thirdparty = metafunc.config.option.thirdparty
  cases = list(run.collect_dir_tests(base_dir, test_files))
  if thirdparty:
   cases.extend(run.collect_dir_tests(os.path.join(base_dir, 'thirdparty'), test_files, True))
  ids = [('%s:%s' % (c.module_name, c.line_nr_test)) for c in cases]
  metafunc.parametrize('case', cases, ids=ids)
 if ('refactor_case' in metafunc.fixturenames):
  base_dir = metafunc.config.option.refactor_case_dir
  metafunc.parametrize('refactor_case', refactor.collect_dir_tests(base_dir, test_files))
 if ('static_analysis_case' in metafunc.fixturenames):
  base_dir = os.path.join(os.path.dirname(__file__), 'static_analysis')
  metafunc.parametrize('static_analysis_case', collect_static_analysis_tests(base_dir, test_files))

def pytest_generate_tests ( metafunc ) : test_files = dict ( map ( parse_test_files_option , metafunc . config . option . test_files ) ) if ( 'case' in metafunc . fixturenames ) : base_dir = metafunc . config . option . integration_case_dir thirdparty = metafunc . config . option . thirdparty cases = list ( run . collect_dir_tests ( base_dir , test_files ) ) if thirdparty : cases . extend ( run . collect_dir_tests ( os . path . join ( base_dir , 'thirdparty' ) , test_files , True ) ) ids = [ ( '%s:%s' % ( c . module_name , c . line_nr_test ) ) for c in cases ] metafunc . parametrize ( 'case' , cases , ids = ids ) if ( 'refactor_case' in metafunc . fixturenames ) : base_dir = metafunc . config . option . refactor_case_dir metafunc . parametrize ( 'refactor_case' , refactor . collect_dir_tests ( base_dir , test_files ) ) if ( 'static_analysis_case' in metafunc . fixturenames ) : base_dir = os . path . join ( os . path . dirname ( __file__ ) , 'static_analysis' ) metafunc . parametrize ( 'static_analysis_case' , collect_static_analysis_tests ( base_dir , test_files ) )
build a list of test arguments for test_copy_transpose .