We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aabe8c9 commit 1edf987Copy full SHA for 1edf987
tests/test_core.py
@@ -0,0 +1,15 @@
1
+import pytest
2
+
3
+from testcontainers.core.container import DockerContainer
4
+from testcontainers.core.waiting_utils import wait_for_logs
5
6
7
+def test_raise_timeout():
8
+ with pytest.raises(TimeoutError):
9
+ with DockerContainer("alpine").with_command("sleep 2") as container:
10
+ wait_for_logs(container, "Hello from Docker!", timeout=1e-3)
11
12
13
+def test_wait_for_hello():
14
+ with DockerContainer("hello-world") as container:
15
+ wait_for_logs(container, "Hello from Docker!")
0 commit comments