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

Method test_tar_with_empty_directory

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

Source from the content-addressed store, hash-verified

388 assert sorted(tar_data.getnames()) == sorted(expected_names)
389
390 def test_tar_with_empty_directory(self):
391 base = tempfile.mkdtemp()
392 self.addCleanup(shutil.rmtree, base)
393 for d in ['foo', 'bar']:
394 os.makedirs(os.path.join(base, d))
395 with tar(base) as archive:
396 tar_data = tarfile.open(fileobj=archive)
397 assert sorted(tar_data.getnames()) == ['bar', 'foo']
398
399 @pytest.mark.skipif(
400 IS_WINDOWS_PLATFORM or os.geteuid() == 0,

Callers

nothing calls this directly

Calls 2

tarFunction · 0.90
joinMethod · 0.80

Tested by

no test coverage detected