Skip to content

Commit 67f25c1

Browse files
committed
deal better with requirements when testing installation
1 parent aac4d7d commit 67f25c1

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

ngs_toolkit/tests/test_install.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,17 @@ def test_all_requirements_are_importable():
7373
replace = {"scikit-learn": "sklearn"}
7474

7575
# handle github stuff
76-
requirements = [
77-
x.split("=")[0].replace(">", "")
78-
for x in data if "extra" not in x]
76+
requirements = list()
77+
for x in data:
78+
for sep in ['>=', '<=', '=', ">", "<"]:
79+
x = x.split(sep)
80+
if len(x) == 2:
81+
x = x[0].replace("=", "").replace(">", "").replace("<", "")
82+
else:
83+
x = x[0]
84+
if "extra" not in x:
85+
requirements.append(x)
86+
7987
# remove commnets
8088
requirements = [x[:x.index(" #")] if "#" in x else x
8189
for x in requirements]

0 commit comments

Comments
 (0)