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

Method test_tar_socket_file

tests/unit/utils_build_test.py:453–463  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

451
452 @pytest.mark.skipif(IS_WINDOWS_PLATFORM, reason='No UNIX sockets on Win32')
453 def test_tar_socket_file(self):
454 base = tempfile.mkdtemp()
455 self.addCleanup(shutil.rmtree, base)
456 for d in ['foo', 'bar']:
457 os.makedirs(os.path.join(base, d))
458 sock = socket.socket(socket.AF_UNIX)
459 self.addCleanup(sock.close)
460 sock.bind(os.path.join(base, 'test.sock'))
461 with tar(base) as archive:
462 tar_data = tarfile.open(fileobj=archive)
463 assert sorted(tar_data.getnames()) == ['bar', 'foo']
464
465 def tar_test_negative_mtime_bug(self):
466 base = tempfile.mkdtemp()

Callers

nothing calls this directly

Calls 3

tarFunction · 0.90
joinMethod · 0.80
bindMethod · 0.80

Tested by

no test coverage detected