From 208af4d231da879174ba189c2f756360ae6dca0a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 7 Jun 2015 10:34:17 -0400 Subject: Add test capturing possible violation in expectation due to new Python 2.7.10 release. Ref #380. --- pkg_resources/tests/test_markers.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 pkg_resources/tests/test_markers.py diff --git a/pkg_resources/tests/test_markers.py b/pkg_resources/tests/test_markers.py new file mode 100644 index 00000000..d8844e74 --- /dev/null +++ b/pkg_resources/tests/test_markers.py @@ -0,0 +1,16 @@ +try: + import unittest.mock as mock +except ImportError: + 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 -- cgit v1.2.1