Skip to content

Commit

Permalink
chore: address linter issues
Browse files Browse the repository at this point in the history
Signed-off-by: Claudio Matsuoka <[email protected]>
  • Loading branch information
cmatsuoka committed Feb 11, 2025
1 parent 522e316 commit c045cc5
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 14 deletions.
14 changes: 7 additions & 7 deletions tests/integration/plugins/test_poetry.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,12 @@ def _get_system_python_interpreter(self) -> str | None:
actions = lf.plan(Step.PRIME)

out = pathlib.Path("out.txt")
with out.open(mode="w") as outfile, err.open(mode="w") as errfile, pytest.raises(errors.PluginBuildError):
err = pathlib.Path("err.txt")
with (
out.open(mode="w") as outfile,
err.open(mode="w") as errfile,
pytest.raises(errors.PluginBuildError),
):
with lf.action_executor() as ctx:
ctx.execute(actions, stdout=outfile, stderr=errfile)

Expand All @@ -255,12 +260,7 @@ def _get_system_python_interpreter(self) -> str | None:
assert expected_text in output

output = err.read_text()
expected_text = textwrap.dedent(
f"""\
No suitable Python interpreter found, giving up.
"""
)
assert expected_text in output
assert "No suitable Python interpreter found, giving up." in output


def test_find_payload_python_good_version(new_dir, partitions, parts_dict, poetry_part):
Expand Down
13 changes: 6 additions & 7 deletions tests/integration/plugins/test_python.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,11 @@ def _get_system_python_interpreter(self) -> str | None:

out = Path("out.txt")
err = Path("err.txt")
with out.open(mode="w") as outfile, err.open(mode="w") as errfile, pytest.raises(errors.PluginBuildError):
with (
out.open(mode="w") as outfile,
err.open(mode="w") as errfile,
pytest.raises(errors.PluginBuildError),
):
with lf.action_executor() as ctx:
ctx.execute(actions, stdout=outfile, stderr=errfile)

Expand All @@ -336,12 +340,7 @@ def _get_system_python_interpreter(self) -> str | None:
assert expected_text in output

output = err.read_text()
expected_text = textwrap.dedent(
f"""\
No suitable Python interpreter found, giving up.
"""
)
assert expected_text in output
assert "No suitable Python interpreter found, giving up." in output


def test_find_payload_python_good_version(new_dir, partitions):
Expand Down

0 comments on commit c045cc5

Please sign in to comment.