Commit 280cce52 authored by Steve Kowalik's avatar Steve Kowalik

Add in a test that checks comparsion of Requirement with markers

parent bd090b80
......@@ -509,6 +509,28 @@ class TestParsing:
with pytest.raises(ValueError):
Requirement.parse("#")
def test_requirements_with_markers(self):
assert (
Requirement.parse("foobar;os_name=='a'")
==
Requirement.parse("foobar;os_name=='a'")
)
assert (
Requirement.parse("name==1.1;python_version=='2.7'")
!=
Requirement.parse("name==1.1;python_version=='3.3'")
)
assert (
Requirement.parse("name==1.0;python_version=='2.7'")
!=
Requirement.parse("name==1.2;python_version=='2.7'")
)
assert (
Requirement.parse("name[foo]==1.0;python_version=='3.3'")
!=
Requirement.parse("name[foo,bar]==1.0;python_version=='3.3'")
)
def test_local_version(self):
req, = parse_requirements('foo==1.0.org1')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment