diff --git a/_pytest/main.py b/_pytest/main.py index bf7e54a91..95e3b84b5 100644 --- a/_pytest/main.py +++ b/_pytest/main.py @@ -10,6 +10,7 @@ except ImportError: from UserDict import DictMixin as MappingMixin from _pytest.mark import MarkInfo +import _pytest.runner tracebackcutdir = py.path.local(_pytest.__file__).dirpath() @@ -348,16 +349,9 @@ class Collector(Node): and thus iteratively build a tree. """ - _skip_exceptions = None - @property - def skip_exceptions(self): - if self._skip_exceptions is None: - return (py.test.skip.Exception,) - return self._skip_exceptions - - @skip_exceptions.setter - def skip_exceptions(self, value): - self._skip_exceptions = value + # the set of exceptions to interpret as "Skip the whole module" during + # collection + skip_exceptions = (_pytest.runner.Skipped,) class CollectError(Exception): """ an error during collection, contains a custom message. """