def pytest_generate_tests(metafunc): # Prepare the globals global_dict, target_dev, ref_dev = InitializeGlobals(metafunc) # Prepare the parametors for the target function. metafunc.parametrize('dev, expected', [(['Fake_device'], 1), (target_dev, 0)])
def pytest_generate_tests(metafunc): # Prepare the globals global_dict, target_dev, ref_dev = InitializeGlobals(metafunc) # Prepare the parametors for the target function. metafunc.parametrize('Davinci_folder, newMode', [(global_dict['Davinci_folder'], 'Disabled'), (global_dict['Davinci_folder'], 'HyperSoftCam')])
def pytest_generate_tests(metafunc): # Prepare the globals global_dict, target_dev, ref_dev = InitializeGlobals(metafunc) # Prepare the parametors for the target function. device_name = target_dev[0] metafunc.parametrize('device_name, expected', [(device_name, 'COM 2'), ('Fake_device', '')] )
def pytest_generate_tests(metafunc): # Prepare the globals global_dict, target_dev, ref_dev = InitializeGlobals(metafunc) # Prepare the parametors for the target function. device_name = '' if target_dev: device_name = target_dev[0] logFolder = metafunc.config.option.work_folder metafunc.parametrize("devices", [(target_dev)])
def pytest_generate_tests(metafunc): # Prepare the globals global_dict, target_dev, ref_dev = InitializeGlobals(metafunc) # Prepare the parametors for the target function. device_name = '' if target_dev: device_name = target_dev[0] logFolder = global_dict['work_folder'] metafunc.parametrize("device_name, logFolder", [(device_name, logFolder)])
def pytest_generate_tests(metafunc): # Prepare the globals global_dict, target_dev, ref_dev = InitializeGlobals(metafunc) # Prepare the parametors for the target function. device_name = '' if target_dev: device_name = target_dev[0] print target_dev metafunc.parametrize("device, expected", [(device_name, True), ('Fake_Device', False)])
def pytest_generate_tests(metafunc): # Prepare the globals global_dict, target_dev, ref_dev = InitializeGlobals(metafunc) command = r'{0}\platform-tools\adb.exe '.format(global_dict['Davinci_folder']) subprocess.call([command, 'kill-server']) command = r'{0}\platform-tools\adb.exe'.format(global_dict['Davinci_folder']) subprocess.call([command, 'start-server']) # Prepare the parametors for the target function. metafunc.parametrize('clean_pattern, check_pattern, process_name, expected', [('{0}\adb.exe'.format(global_dict['Davinci_folder']), r'fork-server server', 'adb.exe', True), ('fork-server server', r'fork-server server', 'adb.exe', False)] )
def pytest_generate_tests(metafunc): # Prepare the globals global_dict, target_dev, ref_dev = InitializeGlobals(metafunc) # Prepare the parametors for the target function. apk_folder = global_dict['apk_folder'] files = glob.glob(ur'%s\*.apk' % apk_folder) if len(files) > 0: apk_path = files[0] else: print "no apk in apk_folder %s" % apk_folder sys.exit(-1) metafunc.parametrize('davincifolder, apk_path', [(global_dict['Davinci_folder'], apk_path)])
def pytest_generate_tests(metafunc): # Prepare the globals global_dict, target_dev, ref_dev = InitializeGlobals(metafunc)
def pytest_generate_tests(metafunc): # Prepare the globals global_dict, target_dev, ref_dev = InitializeGlobals(metafunc) # Prepare the parametors for the target function. metafunc.parametrize('defined_dev', [(target_dev)])