Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
  • Loading branch information
scop and nicoddemus committed May 18, 2023
1 parent 18c6488 commit 3282995
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/_pytest/cacheprovider.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,7 @@ def set(self, key: str, value: object) -> None:
path.parent.mkdir(exist_ok=True, parents=True)
except OSError as exc:
self.warn(
"could not create cache path {path}: {exc}",
path=path,
exc=exc,
f"could not create cache path {path}: {exc}",
_ispytest=True,
)
return
Expand All @@ -194,9 +192,7 @@ def set(self, key: str, value: object) -> None:
f = path.open("w", encoding="UTF-8")
except OSError as exc:
self.warn(

Check warning on line 194 in src/_pytest/cacheprovider.py

View check run for this annotation

Codecov / codecov/patch

src/_pytest/cacheprovider.py#L193-L194

Added lines #L193 - L194 were not covered by tests
"cache could not write path {path}: {exc}",
path=path,
exc=exc,
f"cache could not write path {path}: {exc}",
_ispytest=True,
)
else:
Expand Down

0 comments on commit 3282995

Please sign in to comment.