diff options
author | holger krekel <holger@merlinux.eu> | 2013-08-16 11:33:58 +0200 |
---|---|---|
committer | holger krekel <holger@merlinux.eu> | 2013-08-16 11:33:58 +0200 |
commit | ca7c1f5d8eb54475ab57acf325c67687ab61648c (patch) | |
tree | 87b40d827115ef57e0f05f3cc4d7175ed72901e1 /_pytest/main.py | |
parent | 2888988eb6292d006f64469f7d6943823b966932 (diff) | |
parent | ba0100e0573c46cf1959344807a962a137d4fd7c (diff) | |
download | pytest-ca7c1f5d8eb54475ab57acf325c67687ab61648c.tar.gz |
merge pull request #27: correctly handle nose.SkipTest during collection. Thanks
Antonio Cuni, Ronny Pfannschmidt. I did a few tweaks to the test and the
activation (depending on if unittest is imported at all).
Diffstat (limited to '_pytest/main.py')
-rw-r--r-- | _pytest/main.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/_pytest/main.py b/_pytest/main.py index 2d1152423..cde683b47 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() @@ -368,6 +369,11 @@ class Collector(Node): """ Collector instances create children through collect() and thus iteratively build a tree. """ + + # 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. """ |