MCPcopy
hub / github.com/conda/conda / test_remove_prefix_from_path_1

Function test_remove_prefix_from_path_1

tests/test_activate.py:339–350  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

337
338
339def test_remove_prefix_from_path_1():
340 activator = PosixActivator()
341 original_path = tuple(activator._get_starting_path_list())
342 keep_path = activator.path_conversion("/keep/this/path")
343 final_path = (keep_path, *original_path)
344 final_path = activator.path_conversion(final_path)
345
346 test_prefix = join(os.getcwd(), "mytestpath")
347 new_paths = tuple(activator._get_path_dirs(test_prefix))
348 prefix_added_path = (keep_path, *new_paths, *original_path)
349 new_path = activator._remove_prefix_from_path(test_prefix, prefix_added_path)
350 assert final_path == new_path
351
352
353def test_remove_prefix_from_path_2():

Callers

nothing calls this directly

Calls 6

PosixActivatorClass · 0.90
joinFunction · 0.85
path_conversionMethod · 0.80
_get_path_dirsMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…