summaryrefslogtreecommitdiff
path: root/pkg_resources/api_tests.txt
diff options
context:
space:
mode:
Diffstat (limited to 'pkg_resources/api_tests.txt')
-rw-r--r--pkg_resources/api_tests.txt66
1 files changed, 21 insertions, 45 deletions
diff --git a/pkg_resources/api_tests.txt b/pkg_resources/api_tests.txt
index d28db0f5..4fbd3d23 100644
--- a/pkg_resources/api_tests.txt
+++ b/pkg_resources/api_tests.txt
@@ -338,88 +338,64 @@ Environment Markers
>>> import os
>>> print(im("sys_platform"))
- Comparison or logical expression expected
+ Invalid marker: 'sys_platform', parse error at ''
>>> print(im("sys_platform=="))
- invalid syntax
+ Invalid marker: 'sys_platform==', parse error at ''
>>> print(im("sys_platform=='win32'"))
False
>>> print(im("sys=='x'"))
- Unknown name 'sys'
+ Invalid marker: "sys=='x'", parse error at "sys=='x'"
>>> print(im("(extra)"))
- Comparison or logical expression expected
+ Invalid marker: '(extra)', parse error at ')'
>>> print(im("(extra"))
- invalid syntax
+ Invalid marker: '(extra', parse error at ''
>>> print(im("os.open('foo')=='y'"))
- Language feature not supported in environment markers
+ Invalid marker: "os.open('foo')=='y'", parse error at 'os.open('
>>> print(im("'x'=='y' and os.open('foo')=='y'")) # no short-circuit!
- Language feature not supported in environment markers
+ Invalid marker: "'x'=='y' and os.open('foo')=='y'", parse error at 'and os.o'
>>> print(im("'x'=='x' or os.open('foo')=='y'")) # no short-circuit!
- Language feature not supported in environment markers
+ Invalid marker: "'x'=='x' or os.open('foo')=='y'", parse error at 'or os.op'
>>> print(im("'x' < 'y' < 'z'"))
- Chained comparison not allowed in environment markers
+ Invalid marker: "'x' < 'y' < 'z'", parse error at "< 'z'"
>>> print(im("r'x'=='x'"))
- Only plain strings allowed in environment markers
+ Invalid marker: "r'x'=='x'", parse error at "r'x'=='x"
>>> print(im("'''x'''=='x'"))
- Only plain strings allowed in environment markers
+ Invalid marker: "'''x'''=='x'", parse error at "'x'''=='"
>>> print(im('"""x"""=="x"'))
- Only plain strings allowed in environment markers
+ Invalid marker: '"""x"""=="x"', parse error at '"x"""=="'
- >>> print(im(r"'x\n'=='x'"))
- Only plain strings allowed in environment markers
+ >>> print(im(r"x\n=='x'"))
+ Invalid marker: "x\\n=='x'", parse error at "x\\n=='x'"
>>> print(im("os.open=='y'"))
- Language feature not supported in environment markers
-
- >>> em('"x"=="x"')
- True
-
- >>> em('"x"=="y"')
- False
-
- >>> em('"x"=="y" and "x"=="x"')
- False
-
- >>> em('"x"=="y" or "x"=="x"')
- True
-
- >>> em('"x"=="y" and "x"=="q" or "z"=="z"')
- True
-
- >>> em('"x"=="y" and ("x"=="q" or "z"=="z")')
- False
-
- >>> em('"x"=="y" and "z"=="z" or "x"=="q"')
- False
-
- >>> em('"x"=="x" and "z"=="z" or "x"=="q"')
- True
+ Invalid marker: "os.open=='y'", parse error at 'os.open='
>>> em("sys_platform=='win32'") == (sys.platform=='win32')
True
- >>> em("'x' in 'yx'")
- True
-
- >>> em("'yx' in 'x'")
- False
-
>>> em("python_version >= '2.6'")
True
>>> em("python_version > '2.5'")
True
+ >>> im("implementation_name=='cpython'")
+ False
+
>>> im("platform_python_implementation=='CPython'")
False
+
+ >>> im("implementation_version=='3.5.1'")
+ False