From 42823329677f5e491cdccba38a85fd5dfdf5f2ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Fri, 20 Nov 2020 20:44:59 +0100 Subject: [PATCH] Properly test for our options in tox_runenvreport() The tests were failing with "no module named pip" on Pythons without globally available pip. --- src/tox_current_env/hooks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tox_current_env/hooks.py b/src/tox_current_env/hooks.py index d1ff45f..cec85e5 100644 --- a/src/tox_current_env/hooks.py +++ b/src/tox_current_env/hooks.py @@ -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)