@@ -2140,7 +2140,8 @@ def test_solver_duplicate_dependencies_with_overlapping_markers_complex(
2140
2140
)
2141
2141
opencv_requires = {dep .to_pep_508 () for dep in ops [- 1 ].package .requires }
2142
2142
2143
- assert opencv_requires == {
2143
+ # before https://github.com/python-poetry/poetry-core/pull/851
2144
+ expected1 = {
2144
2145
(
2145
2146
"numpy (>=1.21.2) ;"
2146
2147
' python_version >= "3.6" and platform_system == "Darwin"'
@@ -2170,6 +2171,38 @@ def test_solver_duplicate_dependencies_with_overlapping_markers_complex(
2170
2171
' or platform_system != "Linux" or platform_machine != "aarch64")'
2171
2172
),
2172
2173
}
2174
+ # after https://github.com/python-poetry/poetry-core/pull/851
2175
+ expected2 = {
2176
+ (
2177
+ "numpy (>=1.21.2) ;"
2178
+ ' platform_system == "Darwin" and platform_machine == "arm64"'
2179
+ ' and python_version >= "3.6" or python_version >= "3.10"'
2180
+ ),
2181
+ (
2182
+ 'numpy (>=1.19.3) ; python_version >= "3.6" and python_version < "3.10"'
2183
+ ' and platform_system == "Linux" and platform_machine == "aarch64"'
2184
+ ' or python_version == "3.9" and platform_machine != "arm64"'
2185
+ ' or python_version == "3.9" and platform_system != "Darwin"'
2186
+ ),
2187
+ (
2188
+ 'numpy (>=1.17.3) ; python_version == "3.8"'
2189
+ ' and (platform_system != "Darwin" or platform_machine != "arm64")'
2190
+ ' and (platform_system != "Linux" or platform_machine != "aarch64")'
2191
+ ),
2192
+ (
2193
+ 'numpy (>=1.14.5) ; python_version == "3.7"'
2194
+ ' and (platform_system != "Darwin" or platform_machine != "arm64")'
2195
+ ' and (platform_system != "Linux" or platform_machine != "aarch64")'
2196
+ ),
2197
+ (
2198
+ 'numpy (>=1.13.3) ; python_version < "3.7"'
2199
+ ' and (python_version < "3.6" or platform_system != "Darwin"'
2200
+ ' or platform_machine != "arm64") and (python_version < "3.6"'
2201
+ ' or platform_system != "Linux" or platform_machine != "aarch64")'
2202
+ ),
2203
+ }
2204
+
2205
+ assert opencv_requires in (expected1 , expected2 )
2173
2206
2174
2207
2175
2208
def test_duplicate_path_dependencies (
0 commit comments