I\'m researching new version of pytest (2.3) and getting very excited about the new functionality where you
\"can precisely control teardown by regis
Indeed, there are no good examples for teardown yet. The request object has a addfinalizer method. Here is an example usage:
@pytest.setup(scope=...)
def mysetup(request):
...
request.addfinalizer(finalizerfunction)
...
The finalizerfunction will be called when all tests withing the scope finished execution.