How to use _list_section_factors method in tox

Best Python code snippet using tox_python

config.py

Source:config.py Github

copy

Full Screen

...539 config.setupdir = reader.getpath("setupdir", "{toxinidir}")540 config.logdir = config.toxworkdir.join("log")541 config.envlist, all_envs = self._getenvdata(reader)542 # factors used in config or predefined543 known_factors = self._list_section_factors("testenv")544 known_factors.update(default_factors)545 known_factors.add("python")546 # factors stated in config envlist547 stated_envlist = reader.getstring("envlist", replace=False)548 if stated_envlist:549 for env in _split_env(stated_envlist):550 known_factors.update(env.split('-'))551 # configure testenvs552 for name in all_envs:553 section = testenvprefix + name554 factors = set(name.split('-'))555 if section in self._cfg or factors <= known_factors:556 config.envconfigs[name] = \557 self.make_envconfig(name, section, reader._subs, config)558 all_develop = all(name in config.envconfigs559 and config.envconfigs[name].usedevelop560 for name in config.envlist)561 config.skipsdist = reader.getbool("skipsdist", all_develop)562 def _list_section_factors(self, section):563 factors = set()564 if section in self._cfg:565 for _, value in self._cfg[section].items():566 exprs = re.findall(r'^([\w{}\.,-]+)\:\s+', value, re.M)567 factors.update(*mapcat(_split_factor_expr, exprs))568 return factors569 def make_envconfig(self, name, section, subs, config):570 factors = set(name.split('-'))571 reader = SectionReader(section, self._cfg, fallbacksections=["testenv"],572 factors=factors)573 vc = TestenvConfig(config=config, envname=name, factors=factors, reader=reader)574 reader.addsubstitutions(**subs)575 reader.addsubstitutions(envname=name)576 for env_attr in config._testenv_attr:...

Full Screen

Full Screen

_config.py

Source:_config.py Github

copy

Full Screen

...256 config.setupdir = reader.getpath(toxsection, "setupdir", "{toxinidir}")257 config.logdir = config.toxworkdir.join("log")258 config.envlist, all_envs = self._getenvdata(reader, toxsection)259 # configure testenvs260 known_factors = self._list_section_factors("testenv")261 known_factors.update(default_factors)262 known_factors.add("python")263 for name in all_envs:264 section = testenvprefix + name265 factors = set(name.split('-'))266 if section in self._cfg or factors <= known_factors:267 config.envconfigs[name] = \268 self._makeenvconfig(name, section, reader._subs, config)269 all_develop = all(name in config.envconfigs270 and config.envconfigs[name].develop271 for name in config.envlist)272 config.skipsdist = reader.getbool(toxsection, "skipsdist", all_develop)273 def _list_section_factors(self, section):274 factors = set()275 if section in self._cfg:276 for _, value in self._cfg[section].items():277 exprs = re.findall(r'^([\w{}\.,-]+)\:\s+', value, re.M)278 factors.update(*mapcat(_split_factor_expr, exprs))279 return factors280 def _makeenvconfig(self, name, section, subs, config):281 vc = VenvConfig(envname=name)282 vc.config = config283 factors = set(name.split('-'))284 reader = IniReader(self._cfg, fallbacksections=["testenv"],285 factors=factors)286 reader.addsubstitutions(**subs)287 vc.develop = not config.option.installpkg and \...

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 tox 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