Skip to content

Commit 35ee2b4

Browse files
committed
Add a test capturing the basic expectation.
1 parent fe8980b commit 35ee2b4

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

setuptools/package_index.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -864,6 +864,15 @@ def _download_svn(self, url, _filename):
864864

865865
@staticmethod
866866
def _vcs_split_rev_from_url(url):
867+
"""
868+
>>> vsrfu = PackageIndex._vcs_split_rev_from_url
869+
>>> vsrfu('git+https://github.com/pypa/[email protected]#egg-info=setuptools')
870+
('https://github.com/pypa/setuptools', 'v69.0.0')
871+
>>> vsrfu('git+https://github.com/pypa/setuptools#egg-info=setuptools')
872+
('https://github.com/pypa/setuptools', None)
873+
>>> vsrfu('http://foo/bar')
874+
('http://foo/bar', None)
875+
"""
867876
scheme, netloc, path, query, frag = urllib.parse.urlsplit(url)
868877

869878
scheme = scheme.split('+', 1)[-1]

0 commit comments

Comments
 (0)