Skip to content

Commit

Permalink
tests: adapt tests to cosmetic changes caused by poetry-core#818
Browse files Browse the repository at this point in the history
  • Loading branch information
radoering authored and abn committed Jan 18, 2025
1 parent 4d0301e commit 77cd259
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 23 deletions.
18 changes: 11 additions & 7 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "2.0.1"
description = "Python dependency management and packaging made easy."
requires-python = ">=3.9,<4.0"
dependencies = [
"poetry-core (==2.0.1)",
"poetry-core @ git+https://github.com/python-poetry/poetry-core.git",
"build (>=1.2.1,<2.0.0)",
"cachecontrol[filecache] (>=0.14.0,<0.15.0)",
"cleo (>=2.1.0,<3.0.0)",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ optional = true
python-versions = "*"
files = [ ]
groups = [ "main" ]
markers = "extra == \"root-extra-one\" and extra != \"root-extra-two\" or extra == \"root-extra-two\" and extra != \"root-extra-one\""
markers = "extra == \"root-extra-one\" and extra != \"root-extra-two\" or extra != \"root-extra-one\" and extra == \"root-extra-two\""

[[package.dependencies.conflicting-dep]]
version = "1.1.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ optional = true
python-versions = "*"
files = [ ]
groups = [ "main" ]
markers = "extra == \"extra-one\" and extra != \"extra-two\" or extra == \"extra-two\" and extra != \"extra-one\""
markers = "extra == \"extra-one\" and extra != \"extra-two\" or extra != \"extra-one\" and extra == \"extra-two\""

[package.dependencies.transitive-dep-one]
version = "1.1.0"
Expand Down
14 changes: 7 additions & 7 deletions tests/puzzle/test_solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -2035,34 +2035,34 @@ def test_solver_duplicate_dependencies_with_overlapping_markers_complex(
),
(
'numpy (>=1.17.3) ; python_version < "3.9"'
' and (platform_system != "Darwin" and platform_system != "Linux")'
' and platform_system != "Darwin" and platform_system != "Linux"'
' and python_version >= "3.8" or python_version < "3.9"'
' and platform_system != "Darwin" and python_version >= "3.8"'
' and platform_machine != "aarch64" or python_version < "3.9"'
' and platform_machine != "arm64" and python_version >= "3.8"'
' and platform_system != "Linux" or python_version < "3.9"'
' and (platform_machine != "arm64" and platform_machine != "aarch64")'
' and platform_machine != "arm64" and platform_machine != "aarch64"'
' and python_version >= "3.8"'
),
(
'numpy (>=1.14.5) ; python_version < "3.8"'
' and (platform_system != "Darwin" and platform_system != "Linux")'
' and platform_system != "Darwin" and platform_system != "Linux"'
' and python_version >= "3.7" or python_version < "3.8"'
' and platform_system != "Darwin" and python_version >= "3.7"'
' and platform_machine != "aarch64" or python_version < "3.8"'
' and platform_machine != "arm64" and python_version >= "3.7"'
' and platform_system != "Linux" or python_version < "3.8"'
' and (platform_machine != "arm64" and platform_machine != "aarch64")'
' and platform_machine != "arm64" and platform_machine != "aarch64"'
' and python_version >= "3.7"'
),
(
'numpy (>=1.13.3) ; python_version < "3.6" or python_version < "3.7"'
' and (platform_system != "Darwin" and platform_system != "Linux")'
' and platform_system != "Darwin" and platform_system != "Linux"'
' or python_version < "3.7" and platform_system != "Darwin"'
' and platform_machine != "aarch64" or python_version < "3.7"'
' and platform_machine != "arm64" and platform_system != "Linux"'
' or python_version < "3.7" and (platform_machine != "arm64"'
' and platform_machine != "aarch64")'
' or python_version < "3.7" and platform_machine != "arm64"'
' and platform_machine != "aarch64"'
),
},
)
Expand Down
9 changes: 3 additions & 6 deletions tests/puzzle/test_solver_internals.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,16 +213,13 @@ def test_propagate_markers_with_root_extra(
assert tm(result[package]) == {}
assert tm(result[a]) == {"main": 'extra == "foo"'}
assert tm(result[b]) == {
"main": (
'extra == "foo" and sys_platform == "linux"'
' or extra == "bar" and sys_platform == "linux"'
)
"main": 'sys_platform == "linux" and (extra == "foo" or extra == "bar")',
}
assert tm(result[c]) == {"main": 'extra == "foo" and python_version == "3.8"'}
assert tm(result[d]) == {
"main": (
'extra == "foo" and sys_platform == "linux" and python_version == "3.9"'
' or extra == "bar" and sys_platform == "linux" and python_version == "3.9"'
'sys_platform == "linux" and (extra == "foo" or extra == "bar")'
' and python_version == "3.9"'
)
}

Expand Down

0 comments on commit 77cd259

Please sign in to comment.