@pytest.fixture(scope="function")
def clean(request):
    tu = TestUtils()
    if tu.db_exists():
        tu.clean_db()
    tu.clean_fs()
will be run for each test function see pytest.ini
dataset/ETHPy150Open GustavePate/lycheesync/conftest.py/clean