-
-
Notifications
You must be signed in to change notification settings - Fork 525
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f7ca369
commit 9eae7f8
Showing
2 changed files
with
18 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -123,7 +123,7 @@ def test_pyproject_toml_with_setuptools_scm(initproj, cmd): | |
[testenv] | ||
passenv = PYTHONPATH | ||
commands = python -c 'import demo; print(demo.__version__)' | ||
commands = python -c 'import demo; print(demo.__version__, end="")' | ||
""", | ||
}, | ||
) | ||
|
@@ -133,23 +133,28 @@ def test_pyproject_toml_with_setuptools_scm(initproj, cmd): | |
env["EMAIL"] = "[email protected]" | ||
subprocess.check_call(["git", "init"], env=env) | ||
subprocess.check_call(["git", "add", "."], env=env) | ||
subprocess.check_call(["git", "config", "commit.gpgsign", "false"], env=env) | ||
subprocess.check_call(["git", "commit", "-m", "first commit"], env=env) | ||
subprocess.check_call(["git", "tag", "0.1"], env=env) | ||
|
||
result = cmd() | ||
expected = textwrap.dedent( | ||
""" GLOB wheel-make: {0}/setup.py | ||
py create: {0}/.tox/py | ||
py inst: {0}/.tox/dist/demo-0.1-py2.py3-none-any.whl | ||
base = textwrap.dedent( | ||
""" GLOB wheel-make: {} | ||
py create: {} | ||
py inst: {} | ||
py installed: demo==0.1 | ||
py runtests: PYTHONHASHSEED='{1}' | ||
py runtests: commands[0] | python -c 'import demo; print(demo.__version__)' | ||
0.1 | ||
___________________________________ summary ____________________________________ | ||
py runtests: PYTHONHASHSEED='{}' | ||
py runtests: commands[0] | python -c 'import demo; print(demo.__version__, end="")' | ||
0.1___________________________________ summary ___________________________________ | ||
py: commands succeeded | ||
congratulations :) | ||
""".format( | ||
os.getcwd(), result.python_hash_seed | ||
) | ||
""" | ||
) | ||
cwd = os.getcwd() | ||
expected = base.format( | ||
os.path.join(cwd, "setup.py"), | ||
os.path.join(cwd, ".tox", "py"), | ||
os.path.join(cwd, ".tox", "dist", "demo-0.1-py2.py3-none-any.whl"), | ||
result.python_hash_seed, | ||
) | ||
assert result.out == expected |