cleanup code pre pr
This commit is contained in:
parent
9ee6550181
commit
b02d087dbd
|
@ -111,7 +111,6 @@ def catch_warnings_for_item(config, ihook, when, item):
|
|||
yield
|
||||
|
||||
for warning_message in log:
|
||||
# raise ValueError(ihook.pytest_warning_record)
|
||||
ihook.pytest_warning_record.call_historic(
|
||||
kwargs=dict(warning_message=warning_message, nodeid=nodeid, when=when)
|
||||
)
|
||||
|
@ -168,9 +167,8 @@ def pytest_sessionfinish(session):
|
|||
def _issue_warning_captured(warning, hook, stacklevel):
|
||||
"""
|
||||
This function should be used instead of calling ``warnings.warn`` directly when we are in the "configure" stage:
|
||||
at this point the actual options might not have been set, so we manually trigger the pytest_warning_record hooks
|
||||
so we can display these warnings in the terminal.
|
||||
This is a hack until we can sort out #2891.
|
||||
at this point the actual options might not have been set, so we manually trigger the pytest_warning_record
|
||||
hook so we can display these warnings in the terminal. This is a hack until we can sort out #2891.
|
||||
|
||||
:param warning: the warning instance.
|
||||
:param hook: the hook caller
|
||||
|
|
Loading…
Reference in New Issue