summaryrefslogtreecommitdiff
path: root/pkg_resources/api_tests.txt
diff options
context:
space:
mode:
authorSteve Kowalik <steven@wedontsleep.org>2015-12-10 11:35:41 +1300
committerSteve Kowalik <steven@wedontsleep.org>2015-12-10 11:35:41 +1300
commita718819d2849196e902808301c9a95724510c5c1 (patch)
treeffa7e63c52e3101d76a3dc55387dd4f88e367716 /pkg_resources/api_tests.txt
parentdadd14d82c5f1db83704eb1c6da0b62998cb25a7 (diff)
downloadpython-setuptools-git-a718819d2849196e902808301c9a95724510c5c1.tar.gz
First shot at removing usage of _markerlib and switching to the PEP 508 implementation in packaging.
Diffstat (limited to 'pkg_resources/api_tests.txt')
-rw-r--r--pkg_resources/api_tests.txt64
1 files changed, 17 insertions, 47 deletions
diff --git a/pkg_resources/api_tests.txt b/pkg_resources/api_tests.txt
index d28db0f5..ccb4b5cd 100644
--- a/pkg_resources/api_tests.txt
+++ b/pkg_resources/api_tests.txt
@@ -338,88 +338,58 @@ Environment Markers
>>> import os
>>> print(im("sys_platform"))
- Comparison or logical expression expected
+ Invalid marker: 'sys_platform'
>>> print(im("sys_platform=="))
- invalid syntax
+ Invalid marker: 'sys_platform=='
>>> print(im("sys_platform=='win32'"))
False
>>> print(im("sys=='x'"))
- Unknown name 'sys'
+ Invalid marker: "sys=='x'"
>>> print(im("(extra)"))
- Comparison or logical expression expected
+ Invalid marker: '(extra)'
>>> print(im("(extra"))
- invalid syntax
+ Invalid marker: '(extra'
>>> print(im("os.open('foo')=='y'"))
- Language feature not supported in environment markers
+ Invalid marker: "os.open('foo')=='y'"
>>> 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'"
>>> 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'"
>>> print(im("'x' < 'y' < 'z'"))
- Chained comparison not allowed in environment markers
+ Invalid marker: "'x' < 'y' < 'z'"
>>> print(im("r'x'=='x'"))
- Only plain strings allowed in environment markers
+ Invalid marker: "r'x'=='x'"
>>> print(im("'''x'''=='x'"))
- Only plain strings allowed in environment markers
+ Invalid marker: "'''x'''=='x'"
>>> print(im('"""x"""=="x"'))
- Only plain strings allowed in environment markers
+ Invalid marker: '"""x"""=="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'"
>>> print(im("os.open=='y'"))
- Language feature not supported in environment markers
+ Invalid marker: "os.open=='y'"
- >>> em('"x"=="x"')
+ >>> em("'linux' in sys_platform")
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
-
- >>> 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("platform_python_implementation=='CPython'")
+ >>> im("implementation_name=='CPython'")
False