diff --git a/_pytest/__init__.py b/_pytest/__init__.py index 5c8bb36d2..e20364058 100644 --- a/_pytest/__init__.py +++ b/_pytest/__init__.py @@ -1,2 +1,2 @@ # -__version__ = '2.2.0.dev9' +__version__ = '2.2.0.dev10' diff --git a/_pytest/main.py b/_pytest/main.py index 4082b46b8..dc5e2b624 100644 --- a/_pytest/main.py +++ b/_pytest/main.py @@ -330,6 +330,8 @@ class Item(Node): """ a basic test invocation item. Note that for a single function there might be multiple test invocation items. """ + nextitem = None + def reportinfo(self): return self.fspath, None, "" diff --git a/_pytest/runner.py b/_pytest/runner.py index 305fb7fb9..d41b3c1a5 100644 --- a/_pytest/runner.py +++ b/_pytest/runner.py @@ -340,13 +340,7 @@ class SetupState(object): assert not self._finalizers def teardown_exact(self, item): - try: - colitem = item.nextitem - except AttributeError: - # in distributed testing there might be no known nexitem - # and in this case we use the parent node to at least call - # teardown of the current item - colitem = item.parent + colitem = item.nextitem needed_collectors = colitem and colitem.listchain() or [] self._teardown_towards(needed_collectors) diff --git a/setup.py b/setup.py index eb0a71e07..b6d330db0 100644 --- a/setup.py +++ b/setup.py @@ -24,7 +24,7 @@ def main(): name='pytest', description='py.test: simple powerful testing with Python', long_description = long_description, - version='2.2.0.dev9', + version='2.2.0.dev10', url='http://pytest.org', license='MIT license', platforms=['unix', 'linux', 'osx', 'cygwin', 'win32'],