From 275decbfb7409a3020ac750587b745cf2261b6f8 Mon Sep 17 00:00:00 2001 From: David Hotham Date: Wed, 9 Feb 2022 11:28:54 +0000 Subject: [PATCH] fix testcase, raise exception on failure --- src/poetry/packages/locker.py | 5 +---- tests/utils/test_exporter.py | 4 +--- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/poetry/packages/locker.py b/src/poetry/packages/locker.py index 44a88ca3a17..f32bac5c469 100644 --- a/src/poetry/packages/locker.py +++ b/src/poetry/packages/locker.py @@ -255,10 +255,7 @@ def __walk_dependencies( ) if not locked_package: - # Should normally be able to satisfy all requirements, but this case is - # permissible eg if we encounter a dev dependency when walking the - # non-dev dependencies. - continue + raise RuntimeError("Dependency walk failed at {requirement}") # create dependency from locked package to retain dependency metadata # if this is not done, we can end-up with incorrect nested dependencies diff --git a/tests/utils/test_exporter.py b/tests/utils/test_exporter.py index fb9dff4d8ea..2a2acc1984c 100644 --- a/tests/utils/test_exporter.py +++ b/tests/utils/test_exporter.py @@ -1664,8 +1664,6 @@ def test_exporter_exports_requirements_txt_with_legacy_packages_trusted_host( ( False, [ - 'bar==1.2.2 ; python_version >= "2.7" and python_version < "2.8" or' - ' python_version >= "3.6" and python_version < "4.0"', 'foo==1.2.1 ; python_version >= "2.7" and python_version < "2.8" or' ' python_version >= "3.6" and python_version < "4.0"', ], @@ -1688,7 +1686,7 @@ def test_exporter_exports_requirements_txt_with_dev_extras( { "name": "bar", "version": "1.2.2", - "category": "main", + "category": "dev", "optional": False, "python-versions": "*", "dependencies": {