UseCases.FileSysObjects.functions.setUpperTreeSearchPath package

Submodules

UseCases.FileSysObjects.functions.setUpperTreeSearchPath.CallCase module

Check the expansion of ‘sys.path’ by PATH components derived from splice of upper tree.

class UseCases.FileSysObjects.functions.setUpperTreeSearchPath.CallCase.UseCase(methodName='runTest')[source]

Bases: unittest.case.TestCase

testCase000()[source]
testCase001()[source]
testCase002()[source]
testCase003()[source]

Module contents

Use-Cases ‘FileSysObjects.setUpperTreeSearchPath’

Create hierarchical search paths for basic variants. The order simulates inheritance e.g. for superior classes, data, and executables by grouping via filesystem hierarchy.

Example:

a
|-- A.txt
`-- b
    |-- B.txt
    `-- c
        |-- C.txt
        `-- d
            `-- D.txt

Before:

sys.path = [ 'A', ]

Call:

setUpperTreeSearchPath( 'a/b/c/d', basename('a') )

After:

sys.path = [ 'a/b/c/d', 'a/b/c', 'a/b', 'a', 'A', ]