def pytest_runtest_setup(item): """ Hook called after before test setup starts, to start capturing exceptions as early as possible. """ capture_enabled = _is_exception_capture_enabled(item) if capture_enabled: item.qt_exception_capture_manager = _QtExceptionCaptureManager() item.qt_exception_capture_manager.start() yield _process_events() if capture_enabled: item.qt_exception_capture_manager.fail_if_exceptions_occurred("SETUP")
def pytest_runtest_setup(item): """ Hook called after before test setup starts, to start capturing exceptions as early as possible. """ capture_enabled = _is_exception_capture_enabled(item) if capture_enabled: item.qt_exception_capture_manager = _QtExceptionCaptureManager() item.qt_exception_capture_manager.start() yield _process_events() if capture_enabled: item.qt_exception_capture_manager.fail_if_exceptions_occurred('SETUP')
def pytest_runtest_teardown(item): """ Hook called after each test tear down, to process any pending events and avoiding leaking events to the next test. Also, if exceptions have been captured during fixtures teardown, fail the test. """ _process_events() _close_widgets(item) _process_events() yield _process_events() capture_enabled = _is_exception_capture_enabled(item) if capture_enabled: item.qt_exception_capture_manager.fail_if_exceptions_occurred('TEARDOWN') item.qt_exception_capture_manager.finish()
def pytest_runtest_teardown(item): """ Hook called after each test tear down, to process any pending events and avoiding leaking events to the next test. Also, if exceptions have been captured during fixtures teardown, fail the test. """ _process_events() _close_widgets(item) _process_events() yield _process_events() capture_enabled = _is_exception_capture_enabled(item) if capture_enabled: item.qt_exception_capture_manager.fail_if_exceptions_occurred("TEARDOWN") item.qt_exception_capture_manager.finish()
def pytest_runtest_call(item): yield _process_events() capture_enabled = _is_exception_capture_enabled(item) if capture_enabled: item.qt_exception_capture_manager.fail_if_exceptions_occurred("CALL")
def pytest_runtest_call(item): yield _process_events() capture_enabled = _is_exception_capture_enabled(item) if capture_enabled: item.qt_exception_capture_manager.fail_if_exceptions_occurred('CALL')