summaryrefslogtreecommitdiff
path: root/pkg_resources/tests
diff options
context:
space:
mode:
authorSteve Kowalik <steven@wedontsleep.org>2016-03-24 11:37:38 +1100
committerSteve Kowalik <steven@wedontsleep.org>2016-03-24 11:37:38 +1100
commit2d8cb89459af1d68f7efd7da902c9e6954504740 (patch)
treea1c6bf37037e1c380aa5bbe50ecb9f4e15da9e74 /pkg_resources/tests
parent07a1c6988ad6b270a29b1059b7ec71191d67c9bc (diff)
downloadpython-setuptools-git-2d8cb89459af1d68f7efd7da902c9e6954504740.tar.gz
Support environment markers in *_requires, via WorkingSet.
Diffstat (limited to 'pkg_resources/tests')
-rw-r--r--pkg_resources/tests/test_resources.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/pkg_resources/tests/test_resources.py b/pkg_resources/tests/test_resources.py
index 1444b9ba..1d3d5315 100644
--- a/pkg_resources/tests/test_resources.py
+++ b/pkg_resources/tests/test_resources.py
@@ -182,6 +182,11 @@ class TestDistro:
msg = 'Foo 0.9 is installed but Foo==1.2 is required'
assert vc.value.report() == msg
+ ws = WorkingSet([]) # reset
+ # Environment markers are evaluated at resolution time
+ res = ws.resolve(parse_requirements("Foo;python_version<'2'"), ad)
+ assert list(res) == []
+
def testDistroDependsOptions(self):
d = self.distRequires("""
Twisted>=1.5