diff options
| author | Jason R. Coombs <jaraco@jaraco.com> | 2015-12-25 20:12:00 -0500 |
|---|---|---|
| committer | Jason R. Coombs <jaraco@jaraco.com> | 2015-12-25 20:12:00 -0500 |
| commit | c6d8c587ee5a40342ecd540f5858bf0b3f83bc0f (patch) | |
| tree | 29e4fe30c348d5f27ad79542ec05780480fba666 /pkg_resources/api_tests.txt | |
| parent | 6bdbe8957d8c8d293e3fea3fa4baf45eb7c3a3a4 (diff) | |
| parent | bca120fe59c78901914d837fd8dd9d0048196c87 (diff) | |
| download | python-setuptools-git-c6d8c587ee5a40342ecd540f5858bf0b3f83bc0f.tar.gz | |
Merge pull request #164. Fixes #122.
Diffstat (limited to 'pkg_resources/api_tests.txt')
| -rw-r--r-- | pkg_resources/api_tests.txt | 64 |
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 |
