Files
gentoo/dev-python/pipdeptree/files/pipdeptree-2.18.1-fix-pypy-7.3.14.patch
Oz Tiram ce229874b1 dev-python/pipdeptree: fix import from pip._vendor
add dev-python/pytest-console-scripts
 pass -p to epytest

Closes: https://bugs.gentoo.org/937953
Signed-off-by: Oz Tiram <oz.tiram@gmail.com>
Signed-off-by: Petr Vaněk <arkamar@gentoo.org>
2024-08-15 15:40:30 +02:00

25 lines
1009 B
Diff

diff --git a/tests/test_non_host.py b/tests/test_non_host.py
index 2849375..ed7b7b3 100644
--- a/tests/test_non_host.py
+++ b/tests/test_non_host.py
@@ -1,5 +1,6 @@
from __future__ import annotations
+import json
import sys
from platform import python_implementation
from typing import TYPE_CHECKING
@@ -31,10 +32,10 @@ def test_custom_interpreter(
result = virtualenv.cli_run([str(tmp_path / "venv"), "--activators", ""])
py = str(result.creator.exe.relative_to(tmp_path))
cmd = ["", f"--python={result.creator.exe}"] if args_joined else ["", "--python", py]
- mocker.patch("pipdeptree._discovery.sys.argv", cmd)
+ mocker.patch("pipdeptree._discovery.sys.argv", [*cmd, "-j"])
main()
out, _ = capfd.readouterr()
- found = {i.split("==")[0] for i in out.splitlines()}
+ found = {i["package"]["package_name"] for i in json.loads(out)}
implementation = python_implementation()
if implementation == "CPython":
expected = {"pip", "setuptools", "wheel"}