How to use _fix_data_paths method in autotest

Best Python code snippet using autotest_python

setup.py

Source:setup.py Github

copy

Full Screen

...31 for d in list_dicts:32 for k in d:33 result_dict[k] = d[k]34 return result_dict35def _fix_data_paths(package_data_dict):36 '''37 Corrects package data paths38 When the package name is compound, and the package contents, that39 is, file paths, contain the same path name found in the package40 name, setuptools thinks there's an extra directory. This checks41 that condition and adjusts (strips) the 1st directory name.42 '''43 result = {}44 for package_name, package_content in package_data_dict.items():45 package_structure = package_name.split('.')46 package_structure_1st_level = package_structure[1]47 result[package_name] = []48 for p in package_content:49 path_structure = p.split(os.path.sep)50 path_structure_1st_level = path_structure[0]51 if package_structure_1st_level == path_structure_1st_level:52 path = os.path.join(*path_structure[1:])53 else:54 path = p55 result[package_name].append(path)56 return result57def get_package_dir():58 return _combine_dicts([client.setup.get_package_dir(),59 shared.setup.get_package_dir(),60 frontend.setup.get_package_dir(),61 cli.setup.get_package_dir(),62 server.setup.get_package_dir(),63 scheduler.setup.get_package_dir(),64 database_legacy.setup.get_package_dir(),65 tko.setup.get_package_dir(),66 utils.setup.get_package_dir(),67 mirror.setup.get_package_dir()])68def get_packages():69 return (client.setup.get_packages() +70 shared.setup.get_packages() +71 frontend.setup.get_packages() +72 cli.setup.get_packages() +73 server.setup.get_packages() +74 scheduler.setup.get_packages() +75 database_legacy.setup.get_packages() +76 tko.setup.get_packages() +77 utils.setup.get_packages() +78 mirror.setup.get_packages() +79 installation_support.setup.get_packages())80def get_data_files():81 return (tko.setup.get_data_files() +82 utils.setup.get_data_files() +83 mirror.setup.get_data_files())84def get_package_data():85 return _combine_dicts([86 _fix_data_paths(client.setup.get_package_data()),87 _fix_data_paths(frontend.setup.get_package_data()),88 _fix_data_paths(cli.setup.get_package_data()),89 _fix_data_paths(server.setup.get_package_data()),90 _fix_data_paths(scheduler.setup.get_package_data()),91 _fix_data_paths(database_legacy.setup.get_package_data()),92 _fix_data_paths(utils.setup.get_package_data())93 ])94def get_scripts():95 return (client.setup.get_scripts() +96 frontend.setup.get_scripts() +97 cli.setup.get_scripts() +98 server.setup.get_scripts() +99 scheduler.setup.get_scripts() +100 database_legacy.setup.get_scripts() +101 tko.setup.get_scripts() +102 installation_support.setup.get_scripts())103def run():104 setup(name='autotest',105 description='Autotest test framework',106 maintainer='Lucas Meneghel Rodrigues',...

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run autotest automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful