Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

debug ci test failures #7784

Merged
merged 1 commit into from
Apr 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/poetry/inspection/info.py
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,7 @@ def get_pep517_metadata(path: Path) -> PackageInfo:
info = PackageInfo.from_metadata(path)
except EnvCommandError as fbe:
raise PackageInfoError(
path, "Fallback egg_info generation failed.", fbe
path, e, "Fallback egg_info generation failed.", fbe
)
finally:
os.chdir(cwd)
Expand Down
8 changes: 2 additions & 6 deletions tests/inspection/test_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,12 +250,8 @@ def test_info_setup_missing_mandatory_should_trigger_pep517(
setup_py.write_text(decode(setup))

spy = mocker.spy(VirtualEnv, "run")
try:
PackageInfo.from_directory(source_dir)
except PackageInfoError:
assert spy.call_count == 3
else:
assert spy.call_count == 1
_ = PackageInfo.from_directory(source_dir)
assert spy.call_count == 1


def test_info_prefer_poetry_config_over_egg_info():
Expand Down