summaryrefslogtreecommitdiff
path: root/pkg_resources/tests/test_markers.py
diff options
context:
space:
mode:
Diffstat (limited to 'pkg_resources/tests/test_markers.py')
-rw-r--r--pkg_resources/tests/test_markers.py16
1 files changed, 5 insertions, 11 deletions
diff --git a/pkg_resources/tests/test_markers.py b/pkg_resources/tests/test_markers.py
index d8844e74..8d451de3 100644
--- a/pkg_resources/tests/test_markers.py
+++ b/pkg_resources/tests/test_markers.py
@@ -1,16 +1,10 @@
try:
- import unittest.mock as mock
+ import unittest.mock as mock
except ImportError:
- import mock
+ import mock
from pkg_resources import evaluate_marker
-
-@mock.patch.dict('pkg_resources.MarkerEvaluation.values',
- python_full_version=mock.Mock(return_value='2.7.10'))
-def test_lexicographic_ordering():
- """
- Although one might like 2.7.10 to be greater than 2.7.3,
- the marker spec only supports lexicographic ordering.
- """
- assert evaluate_marker("python_full_version > '2.7.3'") is False
+@mock.patch('platform.python_version', return_value='2.7.10')
+def test_ordering(python_version_mock):
+ assert evaluate_marker("python_full_version > '2.7.3'") is True