Skip to content

Commit 6f3f712

Browse files
dimblebyradoering
authored andcommitted
simplify marker simplification
Companion to <python-poetry/poetry-core#530>
1 parent e4dad22 commit 6f3f712

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

tests/repositories/test_pypi_repository.py

+11-4
Original file line numberDiff line numberDiff line change
@@ -139,11 +139,18 @@ def test_package() -> None:
139139
win_inet = package.extras["socks"][0]
140140
assert win_inet.name == "win-inet-pton"
141141
assert win_inet.python_versions == "~2.7 || ~2.6"
142-
assert (
143-
str(win_inet.marker)
144-
== 'sys_platform == "win32" and (python_version == "2.7"'
145-
' or python_version == "2.6") and extra == "socks"'
142+
143+
# Different versions of poetry-core simplify the following marker differently,
144+
# either is fine.
145+
marker1 = (
146+
'sys_platform == "win32" and (python_version == "2.7" or python_version =='
147+
' "2.6") and extra == "socks"'
148+
)
149+
marker2 = (
150+
'sys_platform == "win32" and python_version == "2.7" and extra == "socks" or'
151+
' sys_platform == "win32" and python_version == "2.6" and extra == "socks"'
146152
)
153+
assert str(win_inet.marker) in {marker1, marker2}
147154

148155

149156
@pytest.mark.parametrize(

0 commit comments

Comments
 (0)