Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display pattern and sys.platform with platform mismatch #1176

Merged
merged 2 commits into from
Feb 27, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/changelog/1176.feature.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Display pattern and ``sys.platform`` with platform mismatch - by :user:`blueyed`.
3 changes: 1 addition & 2 deletions docs/changelog/examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@ file ``544.feature.rst``::

``tox --version`` now shows information about all registered plugins - by :user:`obestwalter`


file ``571.bugfix.rst``::

``skip_install`` overrides ``usedevelop`` (``usedevelop`` is an option to choose the
installation type if the package is installed and ``skip_install`` determines if it should be
installed at all) - by :user:`ferdonline`

.. see tox/pyproject.toml for all available categories
.. see pyproject.toml for all available categories (tool.towncrier.type)
4 changes: 3 additions & 1 deletion src/tox/session/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,9 @@ def _summary(self):
exit_code = 1
report = reporter.error
elif status == "platform mismatch":
msg = " {}: {}".format(venv.envconfig.envname, str(status))
msg = " {}: {} ({!r} does not match {!r})".format(
venv.envconfig.envname, str(status), sys.platform, venv.envconfig.platform
)
report = reporter.skip
elif status and status == "ignored failed command":
msg = " {}: {}".format(venv.envconfig.envname, str(status))
Expand Down
4 changes: 3 additions & 1 deletion tests/unit/test_z_cmdline.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,9 @@ def test_skip_platform_mismatch(cmd, initproj):
result = cmd()
assert not result.ret
assert any(
"SKIPPED: python: platform mismatch" == l for l in result.outlines
"SKIPPED: python: platform mismatch ({!r} does not match 'x123')".format(sys.platform)
== l
for l in result.outlines
), result.outlines


Expand Down