mirror of
https://github.com/pypa/pip
synced 2023-12-13 21:30:23 +01:00
Added test for mpkg fix.
This commit is contained in:
parent
885dc01a3b
commit
a2fadcc1a7
3 changed files with 19 additions and 0 deletions
0
tests/packages/pkgwithmpkg-1.0-py2.7-macosx10.7.mpkg.zip
Normal file
0
tests/packages/pkgwithmpkg-1.0-py2.7-macosx10.7.mpkg.zip
Normal file
0
tests/packages/pkgwithmpkg-1.0.tar.gz
Normal file
0
tests/packages/pkgwithmpkg-1.0.tar.gz
Normal file
19
tests/test_finder.py
Normal file
19
tests/test_finder.py
Normal file
|
@ -0,0 +1,19 @@
|
|||
from pip.backwardcompat import urllib
|
||||
|
||||
from pip.req import InstallRequirement
|
||||
from pip.index import PackageFinder
|
||||
|
||||
from tests.path import Path
|
||||
from tests.test_pip import here
|
||||
|
||||
find_links = 'file://' + urllib.quote(str(Path(here).abspath/'packages').replace('\\', '/'))
|
||||
|
||||
|
||||
|
||||
def test_no_mpkg():
|
||||
"""Finder skips zipfiles with "macosx10" in the name."""
|
||||
finder = PackageFinder([find_links], [])
|
||||
req = InstallRequirement.from_line("pkgwithmpkg")
|
||||
found = finder.find_requirement(req, False)
|
||||
|
||||
assert found.url.endswith("pkgwithmpkg-1.0.tar.gz"), found
|
Loading…
Reference in a new issue