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 Mar 5, 2022
1 parent 8a604e3 commit d176709
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 @@ -254,10 +254,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(f"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 @@ -1657,8 +1657,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 @@ -1681,7 +1679,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 d176709

Please sign in to comment.