@pytest.fixture(scope='module')
def vm_tests_fixtures():
 filenames = os.listdir(os.path.join(testutils.fixture_path, 'VMTests'))
 files = [os.path.join(testutils.fixture_path, 'VMTests', f) for f in filenames]
 vm_fixtures = {}
 try:
  for (f, fn) in zip(files, filenames):
   if (f[(-5):] == '.json'):
    vm_fixtures[fn[:(-5)]] = json.load(open(f, 'r'))
 except IOError as e:
  raise IOError('Could not read vmtests.json from fixtures', "Make sure you did 'git submodule init'")
 return vm_fixtures

@ pytest . fixture ( scope = 'module' ) def vm_tests_fixtures ( ) : filenames = os . listdir ( os . path . join ( testutils . fixture_path , 'VMTests' ) ) files = [ os . path . join ( testutils . fixture_path , 'VMTests' , f ) for f in filenames ] vm_fixtures = { } try : for ( f , fn ) in zip ( files , filenames ) : if ( f [ ( - 5 ) : ] == '.json' ) : vm_fixtures [ fn [ : ( - 5 ) ] ] = json . load ( open ( f , 'r' ) ) except IOError as e : raise IOError ( 'Could not read vmtests.json from fixtures' , "Make sure you did 'git submodule init'" ) return vm_fixtures
read vm tests from fixtures fixtures/vmtests/* .