From 62ca4ae963fa99c20a97c9434d77819ea1c708bc Mon Sep 17 00:00:00 2001 From: Thomas Kluyver Date: Wed, 15 Jul 2015 14:28:43 -0700 Subject: [PATCH] Move Interrupted exception class out of Session --- _pytest/main.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/_pytest/main.py b/_pytest/main.py index ead63535a..fc9d64cf6 100644 --- a/_pytest/main.py +++ b/_pytest/main.py @@ -498,10 +498,12 @@ class Item(Node): class NoMatch(Exception): """ raised if matching cannot locate a matching names. """ +class Interrupted(KeyboardInterrupt): + """ signals an interrupted test run. """ + __module__ = 'builtins' # for py3 + class Session(FSCollector): - class Interrupted(KeyboardInterrupt): - """ signals an interrupted test run. """ - __module__ = 'builtins' # for py3 + Interrupted = Interrupted def __init__(self, config): FSCollector.__init__(self, config.rootdir, parent=None,