Skip to content

Commit 25fb018

Browse files
committed
more debugging
1 parent 6fd1a89 commit 25fb018

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

src/pytest_databases/_service.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def _stop_all_containers(client: docker.DockerClient) -> None:
6363
for container in containers:
6464
if container.status == "running":
6565
container.kill()
66-
elif container.status in ["stopped", "dead"]:
66+
elif container.status in {"stopped", "dead"}:
6767
container.remove()
6868
elif container.status == "removing":
6969
continue

src/pytest_databases/docker/elastic_search.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import contextlib
44
import dataclasses
5+
import traceback
56
from typing import TYPE_CHECKING
67

78
import pytest
@@ -41,6 +42,7 @@ def elasticsearch8_responsive(scheme: str, host: str, port: int, user: str, pass
4142
) as client:
4243
return client.ping()
4344
except Exception: # noqa: BLE001
45+
traceback.print_exc()
4446
return False
4547

4648

src/pytest_databases/docker/mysql.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from __future__ import annotations
22

33
import contextlib
4+
import traceback
45
from dataclasses import dataclass
56
from typing import TYPE_CHECKING
67

@@ -49,8 +50,8 @@ def check(_service: ServiceContainer) -> bool:
4950
database=database,
5051
password=password,
5152
)
52-
except Exception as exc: # noqa: BLE001
53-
print(exc)
53+
except Exception: # noqa: BLE001
54+
traceback.print_exc()
5455
return False
5556

5657
try:

0 commit comments

Comments
 (0)