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

Method test_resource_warnings

tests/integration/api_client_test.py:62–75  ·  view source on GitHub ↗

Test no warnings are produced when using the client.

(self)

Source from the content-addressed store, hash-verified

60 """
61
62 def test_resource_warnings(self):
63 """
64 Test no warnings are produced when using the client.
65 """
66
67 with warnings.catch_warnings(record=True) as w:
68 warnings.simplefilter('always')
69
70 client = docker.APIClient(version='auto', **kwargs_from_env())
71 client.images()
72 client.close()
73 del client
74
75 assert len(w) == 0, f"No warnings produced: {w[0].message}"

Callers

nothing calls this directly

Calls 3

kwargs_from_envFunction · 0.90
imagesMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected