# Path: doubles/lifecycle.py
# def teardown():
#     """Tears down the current Doubles environment. Must be called after each test case."""
#     if hasattr(_thread_local_data, 'current_space'):
#         _thread_local_data.current_space.teardown()
#         del _thread_local_data.current_space
# 
# def verify():
#     """Verify a mock
# 
#     Verifies any mocks that have been created during the test run. Must be called after each
#     test case, but before teardown.
#     """
# 
#     if hasattr(_thread_local_data, 'current_space'):
#         _thread_local_data.current_space.verify()


import pytest
from doubles.lifecycle import teardown, verify



@pytest.hookimpl(hookwrapper=True)
def pytest_runtest_call(item):
    outcome = yield

    try:
        outcome.get_result()

# Path: doubles/lifecycle.py
# def teardown():
#     """Tears down the current Doubles environment. Must be called after each test case."""
#     if hasattr(_thread_local_data, 'current_space'):
#         _thread_local_data.current_space.teardown()
#         del _thread_local_data.current_space
# 
# def verify():
#     """Verify a mock
# 
#     Verifies any mocks that have been created during the test run. Must be called after each
#     test case, but before teardown.
#     """
# 
#     if hasattr(_thread_local_data, 'current_space'):
#         _thread_local_data.current_space.verify()


# Path: doubles/pytest_plugin.py
import pytest
from doubles.lifecycle import teardown, verify




@pytest.hookimpl(hookwrapper=True)
def pytest_runtest_call(item):
    outcome = yield

    try:
        outcome.get_result()

        verify()