Skip to content

Commit 4f9cf8d

Browse files
fixup rebase
1 parent 24b1cd8 commit 4f9cf8d

File tree

1 file changed

+1
-17
lines changed

1 file changed

+1
-17
lines changed

Diff for: src/_pytest/unraisableexception.py

+1-17
Original file line numberDiff line numberDiff line change
@@ -42,23 +42,7 @@ class UnraisableMeta(NamedTuple):
4242
)
4343

4444

45-
def _warn_if_triggered(self) -> None:
46-
if self.unraisable:
47-
if self.unraisable.err_msg is not None:
48-
err_msg = self.unraisable.err_msg
49-
else:
50-
err_msg = "Exception ignored in"
51-
msg = f"{err_msg}: {self.unraisable.object!r}\n\n"
52-
msg += "".join(
53-
traceback.format_exception(
54-
self.unraisable.exc_type,
55-
self.unraisable.exc_value,
56-
self.unraisable.exc_traceback,
57-
)
58-
)
59-
warnings.warn(pytest.PytestUnraisableExceptionWarning(msg))
60-
61-
def collect_unraisable(config: Config) -> None:
45+
def collect_unraisable(config: Config) -> None:
6246
pop_unraisable = config.stash[unraisable_exceptions].pop
6347
errors: list[pytest.PytestUnraisableExceptionWarning | RuntimeError] = []
6448
meta = None

0 commit comments

Comments
 (0)