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

Method test_parent_directory

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

Source from the content-addressed store, hash-verified

324 ) == {'README.md', 'README-bis.md'}
325
326 def test_parent_directory(self):
327 base = make_tree(
328 [],
329 ['a.py',
330 'b.py',
331 'c.py'])
332 # Dockerignore reference stipulates that absolute paths are
333 # equivalent to relative paths, hence /../foo should be
334 # equivalent to ../foo. It also stipulates that paths are run
335 # through Go's filepath.Clean, which explicitly "replace
336 # "/.." by "/" at the beginning of a path".
337 assert exclude_paths(
338 base,
339 ['../a.py', '/../b.py']
340 ) == {'c.py'}
341
342
343class TarTest(unittest.TestCase):

Callers

nothing calls this directly

Calls 2

exclude_pathsFunction · 0.90
make_treeFunction · 0.85

Tested by

no test coverage detected