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

Method dummy_tar_stream

tests/integration/api_image_test.py:142–147  ·  view source on GitHub ↗

Yields a stream that is valid tar data of size n_bytes.

(self, n_bytes)

Source from the content-addressed store, hash-verified

140
141 @contextlib.contextmanager
142 def dummy_tar_stream(self, n_bytes):
143 '''Yields a stream that is valid tar data of size n_bytes.'''
144 with tempfile.NamedTemporaryFile() as tar_file:
145 self.write_dummy_tar_content(n_bytes, tar_file)
146 tar_file.seek(0)
147 yield tar_file
148
149 @contextlib.contextmanager
150 def dummy_tar_file(self, n_bytes):

Calls 1

Tested by

no test coverage detected