Commits

holger krekel committed c7127c5

remove a hack that isn't needed because runtestprotocol now memorizes pending teardowns and thus dist-testing has "exact" teardowns as well

Comments (0)

Files changed (4)

_pytest/__init__.py

 #
-__version__ = '2.2.0.dev9'
+__version__ = '2.2.0.dev10'
     """ 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, ""
 

_pytest/runner.py

         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)
 
         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'],
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.