Skip to content

Commit

Permalink
fix testcase, raise exception on failure
Browse files Browse the repository at this point in the history
  • Loading branch information
dimbleby committed Feb 9, 2022
1 parent d76d1ce commit 275decb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
5 changes: 1 addition & 4 deletions src/poetry/packages/locker.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 1 addition & 3 deletions tests/utils/test_exporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"',
],
Expand All @@ -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": {
Expand Down

0 comments on commit 275decb

Please sign in to comment.