From 2443ab547388cc5c0d2e4248660632c584dc216f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Randy=20D=C3=B6ring?= <30527984+radoering@users.noreply.github.com> Date: Fri, 11 Oct 2024 17:16:42 +0200 Subject: [PATCH] tests: make tests forward-compatible with refactoring in poetry-core#773 --- tests/test_factory.py | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/tests/test_factory.py b/tests/test_factory.py index a3c80ba5f4e..ddd4ae657a4 100644 --- a/tests/test_factory.py +++ b/tests/test_factory.py @@ -207,10 +207,18 @@ def test_create_poetry_with_packages_and_includes( {"include": "src_package", "from": "src"}, ] - assert package.include == [ - {"path": "extra_dir/vcs_excluded.txt", "format": []}, - {"path": "notes.txt", "format": []}, - ] + assert package.include in ( + # with https://github.com/python-poetry/poetry-core/pull/773 + [ + {"path": "extra_dir/vcs_excluded.txt"}, + {"path": "notes.txt"}, + ], + # without https://github.com/python-poetry/poetry-core/pull/773 + [ + {"path": "extra_dir/vcs_excluded.txt", "format": []}, + {"path": "notes.txt", "format": []}, + ], + ) def test_create_poetry_with_multi_constraints_dependency(