def test_pretend_version_named_pyproject_integration(tmpdir, monkeypatch, wd): test_pyproject_support_with_git(tmpdir, monkeypatch, wd) monkeypatch.setenv( PRETEND_KEY_NAMED.format(name="setuptools_scm_example".upper()), "3.2.1") res = do((sys.executable, "setup.py", "--version"), tmpdir / "wd") assert res.endswith("3.2.1")
def test_pretend_version_named_pyproject_integration(monkeypatch, wd, metadata_in): test_pyproject_support_with_git(wd, metadata_in) monkeypatch.setenv( PRETEND_KEY_NAMED.format(name="setuptools_scm_example".upper()), "3.2.1") res = wd((sys.executable, "setup.py", "--version")) assert res.endswith("3.2.1")
def test_pretend_version_name_takes_precedence(tmpdir, monkeypatch, wd): monkeypatch.setenv(PRETEND_KEY_NAMED.format(name="test".upper()), "1.0.0") monkeypatch.setenv(PRETEND_KEY, "2.0.0") assert wd.get_version(dist_name="test") == "1.0.0"