diff --git a/src/_pytest/outcomes.py b/src/_pytest/outcomes.py index 35b3bfb9f..4c7958384 100644 --- a/src/_pytest/outcomes.py +++ b/src/_pytest/outcomes.py @@ -66,7 +66,7 @@ def exit(msg, returncode=None): :param int returncode: return code to be used when exiting pytest. """ __tracebackhide__ = True - raise Exit(returncode, msg) + raise Exit(msg, returncode) exit.Exception = Exit