Skip to content

Commit

Permalink
Fix micropkg tests
Browse files Browse the repository at this point in the history
Signed-off-by: Juan Luis Cano Rodríguez <juan_luis_cano@mckinsey.com>
  • Loading branch information
astrojuanlu committed Jun 13, 2023
1 parent f39a024 commit 5387918
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/framework/cli/micropkg/test_micropkg_pull.py
Original file line number Diff line number Diff line change
Expand Up @@ -600,6 +600,17 @@ def test_pull_from_pypi(
return_value=tmp_path,
)

# Mock needed to avoid an error when build.util.project_wheel_metadata
# calls tempfile.TemporaryDirectory, which is mocked
class _FakeWheelMetadata:
def get_all(self, name, failobj=None): # pylint: disable=unused-argument
return []

mocker.patch(
"kedro.framework.cli.micropkg.project_wheel_metadata",
return_value=_FakeWheelMetadata(),
)

options = ["-e", env] if env else []
options += ["--alias", alias] if alias else []

Expand Down

0 comments on commit 5387918

Please sign in to comment.