From 6407c1e3214d4c65095bde8465db4e5142b18fc9 Mon Sep 17 00:00:00 2001 From: David Hotham Date: Mon, 10 Apr 2023 19:37:41 +0100 Subject: [PATCH] debug ci test failures --- src/poetry/inspection/info.py | 2 +- tests/inspection/test_info.py | 8 ++------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/poetry/inspection/info.py b/src/poetry/inspection/info.py index e538a9cc979..10bd7d04ac9 100644 --- a/src/poetry/inspection/info.py +++ b/src/poetry/inspection/info.py @@ -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) diff --git a/tests/inspection/test_info.py b/tests/inspection/test_info.py index c789fae8185..cf222059286 100644 --- a/tests/inspection/test_info.py +++ b/tests/inspection/test_info.py @@ -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():