Skip to content

Commit e9a5a49

Browse files
committed
- Remove colorama dependency from requirements.compiled 🚫
- Enhance test_compile to filter out optional dependencies 🧪
1 parent 319be7d commit e9a5a49

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

‎tests/uv/mock_requirements/requirements.compiled‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,6 @@
33
--index-url https://pypi.org/simple
44
--extra-index-url https://download.pytorch.org/whl/rocm6.1
55

6-
colorama==0.4.6
7-
# via
8-
# --override override.txt
9-
# tqdm
10-
# from https://download.pytorch.org/whl/rocm6.1
116
mpmath==1.3.0
127
# via
138
# -r /home/tel/git/comfy-cli/tests/uv/mock_requirements/y_reqs.txt

‎tests/uv/test_uv.py‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,4 +67,13 @@ def test_compile(mock_prompt_select):
6767
[line for line in known.readlines() if not line.strip().startswith("#")],
6868
[line for line in test.readlines() if not line.strip().startswith("#")],
6969
]
70+
71+
optionalPrefixes = ("colorama==",)
72+
73+
def _filter_optional(lines: list[str]) -> list[str]:
74+
# drop platform-specific extras (Windows pulls in colorama via tqdm)
75+
return [line for line in lines if not any(line.strip().startswith(prefix) for prefix in optionalPrefixes)]
76+
77+
knownLines, testLines = [_filter_optional(lines) for lines in (knownLines, testLines)]
78+
7079
assert knownLines == testLines

0 commit comments

Comments
 (0)