MCPcopy
hub / github.com/docker/docker-py / test_stop

Method test_stop

tests/integration/models_containers_test.py:503–510  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

501 client.close()
502
503 def test_stop(self):
504 client = docker.from_env(version=TEST_API_VERSION)
505 container = client.containers.run("alpine", "top", detach=True)
506 self.tmp_containers.append(container.id)
507 assert container.status in ("running", "created")
508 container.stop(timeout=2)
509 container.reload()
510 assert container.status == "exited"
511
512 def test_top(self):
513 client = docker.from_env(version=TEST_API_VERSION)

Callers

nothing calls this directly

Calls 4

from_envMethod · 0.80
runMethod · 0.80
stopMethod · 0.45
reloadMethod · 0.45

Tested by

no test coverage detected