@pytest.fixture(autouse=True)
def unpin_db(request):
 request.addfinalizer(pinning.unpin_this_thread)

@ pytest . fixture ( autouse = True ) def unpin_db ( request ) : request . addfinalizer ( pinning . unpin_this_thread )
unpin the database from master in the current db .