1
0
mirror of https://github.com/fedora-python/tox-current-env.git synced 2024-12-23 16:46:14 +01:00

Properly test for our options in tox_runenvreport()

The tests were failing with "no module named pip" on Pythons without globally
available pip.
This commit is contained in:
Miro Hrončok 2020-11-20 20:44:59 +01:00 committed by Petr Viktorin
parent d0b0c443ac
commit 4282332967

View File

@ -239,7 +239,7 @@ def tox_runenvreport(venv, action):
"""Prevent using pip to display installed packages,
use importlib.metadata instead, but fallback to default without our flags."""
option = venv.envconfig.config.option
if not (option.current_env or option.print_deps_only):
if not (option.current_env or option.print_deps_to or option.print_extras_to):
return None
return (
"{}=={}".format(d.metadata.get("name"), d.version)