Skip to content

Commit

Permalink
c: is a valid URI scheme
Browse files Browse the repository at this point in the history
  • Loading branch information
sbidoul committed Aug 23, 2020
1 parent efceafe commit 3962f3a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/test_requirements.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def test_url_and_marker(self):

@pytest.mark.parametrize(
"invalid_url",
["/foo/bar", "/foo", "./foo/bar", "./foo", "foo", "c:\\foo\\bar", "c:\\foo"],
["/foo/bar", "/foo", "./foo/bar", "./foo", "foo"],
)
def test_invalid_url(self, invalid_url):
with pytest.raises(InvalidRequirement) as e:
Expand All @@ -130,7 +130,9 @@ def test_vcs_url(self):
req = Requirement("name @ git+file:///data/repo")
self._assert_requirement(req, "name", "git+file:///data/repo")

@pytest.mark.parametrize("url", ["gopher:/foo/com", "mailto:me@example.com"])
@pytest.mark.parametrize(
"url", ["gopher:/foo/com", "mailto:me@example.com", "c:/foo/bar"]
)
def test_exotic_urls(self, url):
req = Requirement("name @ " + url)
self._assert_requirement(req, "name", url)
Expand Down

0 comments on commit 3962f3a

Please sign in to comment.