Skip to content

Exit exception #3144

@feuillemorte

Description

@feuillemorte

We need to except Exit before this part of code:

pytest/_pytest/main.py

Lines 110 to 116 in 0d96a5b

except KeyboardInterrupt:
excinfo = _pytest._code.ExceptionInfo()
if initstate < 2 and isinstance(excinfo.value, exit.Exception):
sys.stderr.write('{0}: {1}\n'.format(
excinfo.typename, excinfo.value.msg))
config.hook.pytest_keyboard_interrupt(excinfo=excinfo)
session.exitstatus = EXIT_INTERRUPTED

and pass a message to xdist module

it needed for xdist:
original task:
pytest-dev/pytest-xdist#86

I'm ready to create pull request, but I don't know how to pass a message to xdist module, Please, give me an advice. Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    plugin: xdistrelated to the xdist external plugintype: enhancementnew feature or API change, should be merged into features branch

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions