Best Python code snippet using tox_python
conf.py
Source:conf.py
...10master_doc = "index"11project = "virtualenv"12copyright = "2007-2018, Ian Bicking, The Open Planning Project, PyPA"13ROOT_SRC_TREE_DIR = Path(__file__).parents[1]14def generate_draft_news():15 home = "https://github.com"16 issue = "{}/issue".format(home)17 fragments_path = ROOT_SRC_TREE_DIR / "docs" / "changelog"18 for pattern, replacement in (19 (r"[^`]@([^,\s]+)", r"`@\1 <{}/\1>`_".format(home)),20 (r"[^`]#([\d]+)", r"`#pr\1 <{}/\1>`_".format(issue)),21 ):22 for path in fragments_path.glob("*.rst"):23 path.write_text(re.sub(pattern, replacement, path.read_text()))24 env = os.environ.copy()25 env["PATH"] += os.pathsep.join([os.path.dirname(sys.executable)] + env["PATH"].split(os.pathsep))26 changelog = subprocess.check_output(27 ["towncrier", "--draft", "--version", "DRAFT"], cwd=str(ROOT_SRC_TREE_DIR), env=env28 ).decode("utf-8")29 if "No significant changes" in changelog:30 content = ""31 else:32 note = "*Changes in master, but not released yet are under the draft section*."33 content = "{}\n\n{}".format(note, changelog)34 (ROOT_SRC_TREE_DIR / "docs" / "_draft.rst").write_text(content)35generate_draft_news()36version = ".".join(__version__.split(".")[:2])37release = __version__38today_fmt = "%B %d, %Y"39unused_docs = []40pygments_style = "sphinx"41exclude_patterns = ["changelog/*"]42extlinks = {43 "issue": ("https://github.com/pypa/virtualenv/issues/%s", "#"),44 "pull": ("https://github.com/pypa/virtualenv/pull/%s", "PR #"),45}46html_theme = "sphinx_rtd_theme"47html_theme_options = {48 "canonical_url": "https://virtualenv.pypa.io/en/latest/",49 "logo_only": False,...
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.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!