def pytest_unconfigure(config): if not config.getoption("--no-teardown"): stop_docker_compose() for log in log_files: try: os.remove(log) except: pass
def pytest_runtest_teardown(item, nextitem): if nextitem is None: stop_docker_compose()
def pytest_unconfigure(config): if not config.getoption("--no-teardown"): stop_docker_compose()