don't call nose' setup methods if they are marked with pytest.setup

This commit is contained in:
holger krekel
2012-09-22 00:23:36 +02:00
parent 738f14a48a
commit 465cfff6f9
4 changed files with 14 additions and 3 deletions

View File

@@ -1,2 +1,2 @@
#
__version__ = '2.3.0.dev15'
__version__ = '2.3.0.dev16'

View File

@@ -41,7 +41,7 @@ def pytest_make_collect_report(collector):
def call_optional(obj, name):
method = getattr(obj, name, None)
if method:
if method is not None and not hasattr(method, "_pytestsetup"):
# If there's any problems allow the exception to raise rather than
# silently ignoring them
method()