mirror of https://github.com/pypa/pip
parent
086e698eae
commit
a947c29903
|
@ -200,8 +200,7 @@ class RequirementSet(object):
|
|||
requirement is applicable and has just been added.
|
||||
"""
|
||||
name = install_req.name
|
||||
if ((not name or not self.has_requirement(name)) and not
|
||||
install_req.match_markers()):
|
||||
if not install_req.match_markers():
|
||||
# Only log if we haven't already got install_req from somewhere.
|
||||
logger.debug("Ignore %s: markers %r don't match",
|
||||
install_req.name, install_req.markers)
|
||||
|
|
|
@ -405,3 +405,16 @@ def test_filter_install():
|
|||
INFO, 'foo bar')
|
||||
assert _filter_install('I made a SyntaxError') == (
|
||||
INFO, 'I made a SyntaxError')
|
||||
|
||||
|
||||
def test_exclusive_environment_markers():
|
||||
"""Make sure RequirementSet accepts several excluding env markers"""
|
||||
eq26 = InstallRequirement.from_line(
|
||||
"Django>=1.6.10,<1.7 ; python_version == '2.6'")
|
||||
ne26 = InstallRequirement.from_line(
|
||||
"Django>=1.6.10,<1.8 ; python_version != '2.6'")
|
||||
|
||||
req_set = RequirementSet('', '', '', session=PipSession())
|
||||
req_set.add_requirement(eq26)
|
||||
req_set.add_requirement(ne26)
|
||||
assert req_set.has_requirement('Django')
|
||||
|
|
Loading…
Reference in New Issue