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

Method test_pause

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

Source from the content-addressed store, hash-verified

382 assert container.logs() == b"hello world\n"
383
384 def test_pause(self):
385 client = docker.from_env(version=TEST_API_VERSION)
386 container = client.containers.run("alpine", "sleep 300", detach=True)
387 self.tmp_containers.append(container.id)
388 container.pause()
389 container.reload()
390 assert container.status == "paused"
391 container.unpause()
392 container.reload()
393 assert container.status == "running"
394
395 def test_remove(self):
396 client = docker.from_env(version=TEST_API_VERSION)

Callers

nothing calls this directly

Calls 5

from_envMethod · 0.80
runMethod · 0.80
pauseMethod · 0.45
reloadMethod · 0.45
unpauseMethod · 0.45

Tested by

no test coverage detected