diff --git a/tests/uv/mock_requirements/requirements.compiled b/tests/uv/mock_requirements/requirements.compiled index 2ff3d84..1750223 100644 --- a/tests/uv/mock_requirements/requirements.compiled +++ b/tests/uv/mock_requirements/requirements.compiled @@ -1,22 +1,29 @@ # This file was autogenerated by uv via the following command: -# uv pip compile /home/tel/git/comfy-cli/tests/uv/mock_requirements/core_reqs.txt /home/tel/git/comfy-cli/tests/uv/mock_requirements/x_reqs.txt /home/tel/git/comfy-cli/tests/uv/mock_requirements/y_reqs.txt --index-strategy unsafe-best-match --override /home/tel/git/comfy-cli/tests/temp/test_uv/override.txt -o /home/tel/git/comfy-cli/tests/temp/test_uv/requirements.compiled +# uv pip compile /home/tel/git/comfy-cli/tests/uv/mock_requirements/core_reqs.txt /home/tel/git/comfy-cli/tests/uv/mock_requirements/x_reqs.txt /home/tel/git/comfy-cli/tests/uv/mock_requirements/y_reqs.txt --emit-index-annotation --emit-index-url --index-strategy unsafe-best-match -o /home/tel/git/comfy-cli/tests/temp/test_uv/requirements.compiled --override /home/tel/git/comfy-cli/tests/temp/test_uv/override.txt +--index-url https://pypi.org/simple +--extra-index-url https://download.pytorch.org/whl/rocm6.1 + mpmath==1.3.0 # via # -r /home/tel/git/comfy-cli/tests/uv/mock_requirements/y_reqs.txt # sympy + # from https://download.pytorch.org/whl/rocm6.1 numpy==2.0.0 # via # --override override.txt # -r /home/tel/git/comfy-cli/tests/uv/mock_requirements/x_reqs.txt # -r /home/tel/git/comfy-cli/tests/uv/mock_requirements/y_reqs.txt + # from https://pypi.org/simple sympy==1.13.0 # via # --override override.txt # -r /home/tel/git/comfy-cli/tests/uv/mock_requirements/x_reqs.txt # -r /home/tel/git/comfy-cli/tests/uv/mock_requirements/y_reqs.txt + # from https://pypi.org/simple tqdm==4.66.4 # via # --override override.txt # -r /home/tel/git/comfy-cli/tests/uv/mock_requirements/core_reqs.txt # -r /home/tel/git/comfy-cli/tests/uv/mock_requirements/x_reqs.txt # -r /home/tel/git/comfy-cli/tests/uv/mock_requirements/y_reqs.txt + # from https://pypi.org/simple diff --git a/tests/uv/test_uv.py b/tests/uv/test_uv.py index 307b3f9..e14958b 100644 --- a/tests/uv/test_uv.py +++ b/tests/uv/test_uv.py @@ -4,6 +4,7 @@ import pytest from comfy_cli import ui +from comfy_cli.constants import GPU_OPTION from comfy_cli.uv import DependencyCompiler hereDir = Path(__file__).parent.resolve() @@ -29,6 +30,7 @@ def _mock_prompt_select(*args, **kwargs): def test_compile(mock_prompt_select): depComp = DependencyCompiler( cwd=temp, + gpu=GPU_OPTION.AMD, outDir=temp, reqFilesCore=[reqsDir / "core_reqs.txt"], reqFilesExt=[reqsDir / "x_reqs.txt", reqsDir / "y_reqs.txt"], @@ -37,10 +39,16 @@ def test_compile(mock_prompt_select): depComp.make_override() depComp.compile_core_plus_ext() + with open(reqsDir / "requirements.compiled", "r") as known, open(temp / "requirements.compiled", "r") as test: + for line in known: + print(line) + for line in test: + print(line) + with open(reqsDir / "requirements.compiled", "r") as known, open(temp / "requirements.compiled", "r") as test: # compare all non-commented lines in generated file vs reference file knownLines, testLines = [ - [line for line in known.readlines() if line.strip()[0] != "#"], - [line for line in test.readlines() if line.strip()[0] != "#"], + [line for line in known.readlines() if not line.strip().startswith("#")], + [line for line in test.readlines() if not line.strip().startswith("#")], ] assert knownLines == testLines