Source code for tests.30_libs.040_FileSysObjects.070_setUpperTreeSearchPath.300_reverse.Case020.CallCase

"""Check defaults.
"""
from __future__ import absolute_import

import unittest
import os,sys

from pysourceinfo.PySourceInfo import getPythonPathRel
from filesysobjects.FileSysObjects import setUpperTreeSearchPath


#
#######################
#
[docs]class CallUnits(unittest.TestCase): # # Create by object #
[docs] def testCase000(self): """Check defaults. """ _s = sys.path[:] start = os.path.dirname(__file__) start = os.path.abspath(start) top = 'tests' _res = [] ret = setUpperTreeSearchPath(start,top,_res,**{'reverse':True}) #@UnusedVariable mypos = os.path.abspath(os.path.normpath(os.path.dirname(__file__)+"/../../")) res = [] for i in range(len(_res)): pr = getPythonPathRel(_res[i],[mypos]) if pr: res.append(pr) resx = [ '.', '300_reverse', '300_reverse/Case020', ] resx = map(os.path.normpath,resx) [ sys.path.pop() for x in range(len(sys.path)) ] #@UnusedVariable sys.path.extend(_s) assert resx == res pass
if __name__ == '__main__': unittest.main()