Skip to content

Commit 009d098

Browse files
committed
test local pip requirements
1 parent 654be04 commit 009d098

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

tests/unit/test_utils.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,3 +110,20 @@ def test_normalize_doi():
110110
assert utils.normalize_doi("http://doi.org/10.1234/jshd123") == "10.1234/jshd123"
111111
assert utils.normalize_doi("https://doi.org/10.1234/jshd123") == "10.1234/jshd123"
112112
assert utils.normalize_doi("http://dx.doi.org/10.1234/jshd123") == "10.1234/jshd123"
113+
114+
115+
@pytest.mark.parametrize(
116+
"req, is_local",
117+
[
118+
("-r requirements.txt", True),
119+
("-e .", True),
120+
("file://subdir", True),
121+
("file://./subdir", True),
122+
("git://github.com/jupyter/repo2docker", False),
123+
("git+https://github.com/jupyter/repo2docker", False),
124+
("numpy", False),
125+
("# -e .", False),
126+
],
127+
)
128+
def test_local_pip_requirement(req, is_local):
129+
assert utils.is_local_pip_requirement(req) == is_local

0 commit comments

Comments
 (0)