summaryrefslogtreecommitdiffstats
path: root/Lib/packaging
diff options
context:
space:
mode:
authorÉric Araujo <merwok@netwok.org>2012-02-09 20:18:26 (GMT)
committerÉric Araujo <merwok@netwok.org>2012-02-09 20:18:26 (GMT)
commit6e1f564efae560a82c3da5acab805c2857f9788c (patch)
tree5a3e67e48d3c0891e47a73d03a4726181aec74a2 /Lib/packaging
parentac03a2b089ff73edb7a4080e51715a6e7d015b1d (diff)
downloadcpython-6e1f564efae560a82c3da5acab805c2857f9788c.zip
cpython-6e1f564efae560a82c3da5acab805c2857f9788c.tar.gz
cpython-6e1f564efae560a82c3da5acab805c2857f9788c.tar.bz2
More boolean tests for packaging metadata environment markers
Diffstat (limited to 'Lib/packaging')
-rw-r--r--Lib/packaging/tests/test_markers.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/Lib/packaging/tests/test_markers.py b/Lib/packaging/tests/test_markers.py
index dec0429..a494c6b 100644
--- a/Lib/packaging/tests/test_markers.py
+++ b/Lib/packaging/tests/test_markers.py
@@ -21,8 +21,6 @@ class MarkersTestCase(LoggingCatcher,
self.assertTrue(interpret("sys.platform == '%s'" % sys_platform))
self.assertTrue(interpret(
- "sys.platform == '%s' or python_version == '2.4'" % sys_platform))
- self.assertTrue(interpret(
"sys.platform == '%s' and python_full_version == '%s'" %
(sys_platform, version)))
self.assertTrue(interpret("'%s' == sys.platform" % sys_platform))
@@ -41,12 +39,18 @@ class MarkersTestCase(LoggingCatcher,
# combined operations
OP = 'os.name == "%s"' % os_name
+ FALSEOP = 'os.name == "buuuu"'
AND = ' and '
OR = ' or '
self.assertTrue(interpret(OP + AND + OP))
self.assertTrue(interpret(OP + AND + OP + AND + OP))
self.assertTrue(interpret(OP + OR + OP))
- self.assertTrue(interpret(OP + OR + OP + OR + OP))
+ self.assertTrue(interpret(OP + OR + FALSEOP))
+ self.assertTrue(interpret(OP + OR + OP + OR + FALSEOP))
+ self.assertTrue(interpret(OP + OR + FALSEOP + OR + FALSEOP))
+ self.assertTrue(interpret(FALSEOP + OR + OP))
+ self.assertFalse(interpret(FALSEOP + AND + FALSEOP))
+ self.assertFalse(interpret(FALSEOP + OR + FALSEOP))
# other operators
self.assertTrue(interpret("os.name != 'buuuu'"))