You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
pytest_keyboard_interrupt hook is also called with --maxfail #1865
Subclass Interrupted from something else (RuntimeError?)
Make Interrupted part of the public API so plugins can raise or catch it; perhaps by making it available in the pytest namespace? Also, how about renaming it to SessionInterrupt?
This has to be done carefully, because there are a number of places which handle KeyboardInterrupt on pytest's code base that will have to be changed to also handle SessionInterrupt.
I also noticed that Exit also subclasses KeyboardInterrupt.
Activity
The-Compiler commentedon Aug 24, 2016
FWIW,
Interruptedbeing a subclass ofKeyboardInterruptsounds weird to me...WIP: save data with --xfail / -x
nicoddemus commentedon Aug 26, 2016
I agree. I think that we should:
Interruptedfrom something else (RuntimeError?)Interruptedpart of the public API so plugins can raise or catch it; perhaps by making it available in thepytestnamespace? Also, how about renaming it toSessionInterrupt?This has to be done carefully, because there are a number of places which handle
KeyboardInterrupton pytest's code base that will have to be changed to also handleSessionInterrupt.I also noticed that
Exitalso subclassesKeyboardInterrupt.The-Compiler commentedon Aug 26, 2016
If you do
except RuntimeError:, would you expectInterruptedto be caught (I don't)? If not, it should simply subclassException.nicoddemus commentedon Aug 26, 2016
Good point!
Derive outcomes.exit.Exception from SystemExit instead of KeyboardInt…
Derive outcomes.exit.Exception from SystemExit instead of KeyboardInt…
Derive outcomes.exit.Exception from SystemExit instead of KeyboardInt…
Derive outcomes.exit.Exception from SystemExit instead of KeyboardInt…
Derive outcomes.exit.Exception from SystemExit instead of KeyboardInt…