Skip to content

Commit 44862b1

Browse files
committed
Changed default behaviour to suppressing output logs
The logs can be enabled in the pytest output by using pytest's regular verbose flag namely --verbose or -v
1 parent 75b3f46 commit 44862b1

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/pytest_docker_compose/__init__.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,6 @@ def pytest_addoption(parser):
8888
default=False, help="Boolean to use a running set of containers "
8989
"instead of calling 'docker-compose up'")
9090

91-
group.addoption("--disable-logs-output", action="store_true",
92-
default=False, help="Boolean to not print the logs of each container after tests")
93-
9491
@pytest.fixture(scope="session")
9592
def docker_project(self, request):
9693
"""
@@ -172,7 +169,7 @@ def scoped_containers_fixture(docker_project: Project, request):
172169
container_getter = ContainerGetter(docker_project)
173170
yield container_getter
174171

175-
if not request.config.getoption("--disable-logs-output"):
172+
if request.config.getoption("--verbose"):
176173
for container in sorted(containers, key=lambda c: c.name):
177174
header = "Logs from {name}:".format(name=container.name)
178175
print(header, '\n', "=" * len(header))

0 commit comments

Comments
 (0)