Skip to content

Commit b02d087

Browse files
committed
cleanup code pre pr
1 parent 9ee6550 commit b02d087

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/_pytest/warnings.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@ def catch_warnings_for_item(config, ihook, when, item):
111111
yield
112112

113113
for warning_message in log:
114-
# raise ValueError(ihook.pytest_warning_record)
115114
ihook.pytest_warning_record.call_historic(
116115
kwargs=dict(warning_message=warning_message, nodeid=nodeid, when=when)
117116
)
@@ -168,9 +167,8 @@ def pytest_sessionfinish(session):
168167
def _issue_warning_captured(warning, hook, stacklevel):
169168
"""
170169
This function should be used instead of calling ``warnings.warn`` directly when we are in the "configure" stage:
171-
at this point the actual options might not have been set, so we manually trigger the pytest_warning_record hooks
172-
so we can display these warnings in the terminal.
173-
This is a hack until we can sort out #2891.
170+
at this point the actual options might not have been set, so we manually trigger the pytest_warning_record
171+
hook so we can display these warnings in the terminal. This is a hack until we can sort out #2891.
174172
175173
:param warning: the warning instance.
176174
:param hook: the hook caller

0 commit comments

Comments
 (0)