Commit 0c8e5b43 by David Hotham Committed by GitHub

tests: make tests forward compatible with simplified marker simplification (#7136)

parent e4dad229
...@@ -139,11 +139,18 @@ def test_package() -> None: ...@@ -139,11 +139,18 @@ def test_package() -> None:
win_inet = package.extras["socks"][0] win_inet = package.extras["socks"][0]
assert win_inet.name == "win-inet-pton" assert win_inet.name == "win-inet-pton"
assert win_inet.python_versions == "~2.7 || ~2.6" assert win_inet.python_versions == "~2.7 || ~2.6"
assert (
str(win_inet.marker) # Different versions of poetry-core simplify the following marker differently,
== 'sys_platform == "win32" and (python_version == "2.7"' # either is fine.
' or python_version == "2.6") and extra == "socks"' marker1 = (
'sys_platform == "win32" and (python_version == "2.7" or python_version =='
' "2.6") and extra == "socks"'
)
marker2 = (
'sys_platform == "win32" and python_version == "2.7" and extra == "socks" or'
' sys_platform == "win32" and python_version == "2.6" and extra == "socks"'
) )
assert str(win_inet.marker) in {marker1, marker2}
@pytest.mark.parametrize( @pytest.mark.parametrize(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment