MCPcopy Index your code
hub / github.com/docker/docker-py / test_kill

Method test_kill

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

Source from the content-addressed store, hash-verified

363 assert exec_output[0] == 126
364
365 def test_kill(self):
366 client = docker.from_env(version=TEST_API_VERSION)
367 container = client.containers.run("alpine", "sleep 300", detach=True)
368 self.tmp_containers.append(container.id)
369 while container.status != 'running':
370 container.reload()
371 assert container.status == 'running'
372 container.kill()
373 container.reload()
374 assert container.status == 'exited'
375
376 def test_logs(self):
377 client = docker.from_env(version=TEST_API_VERSION)

Callers

nothing calls this directly

Calls 4

from_envMethod · 0.80
runMethod · 0.80
reloadMethod · 0.45
killMethod · 0.45

Tested by

no test coverage detected