def test_1(self): n = lambda path: path.replace('/', sep) assert_equal(minrelpath(n('aa/bb')), n('aa/bb')) assert_equal(minrelpath('..'), '..') assert_equal(minrelpath(n('aa/..')), '') assert_equal(minrelpath(n('aa/../bb')), 'bb') assert_equal(minrelpath(n('aa/bb/..')), 'aa') assert_equal(minrelpath(n('aa/bb/../..')), '') assert_equal(minrelpath(n('aa/bb/../cc/../dd')), n('aa/dd')) assert_equal(minrelpath(n('.././..')), n('../..')) assert_equal(minrelpath(n('aa/bb/.././../dd')), n('dd'))
def test_1(self): n = lambda path: path.replace('/',sep) assert_equal(minrelpath(n('aa/bb')),n('aa/bb')) assert_equal(minrelpath('..'),'..') assert_equal(minrelpath(n('aa/..')),'') assert_equal(minrelpath(n('aa/../bb')),'bb') assert_equal(minrelpath(n('aa/bb/..')),'aa') assert_equal(minrelpath(n('aa/bb/../..')),'') assert_equal(minrelpath(n('aa/bb/../cc/../dd')),n('aa/dd')) assert_equal(minrelpath(n('.././..')),n('../..')) assert_equal(minrelpath(n('aa/bb/.././../dd')),n('dd'))
def test_1(self): n = lambda path: path.replace("/", sep) assert_equal(minrelpath(n("aa/bb")), n("aa/bb")) assert_equal(minrelpath(".."), "..") assert_equal(minrelpath(n("aa/..")), "") assert_equal(minrelpath(n("aa/../bb")), "bb") assert_equal(minrelpath(n("aa/bb/..")), "aa") assert_equal(minrelpath(n("aa/bb/../..")), "") assert_equal(minrelpath(n("aa/bb/../cc/../dd")), n("aa/dd")) assert_equal(minrelpath(n(".././..")), n("../..")) assert_equal(minrelpath(n("aa/bb/.././../dd")), n("dd"))
def check_1(self): import os n = lambda path: path.replace('/', os.path.sep) assert_equal(minrelpath(n('aa/bb')), n('aa/bb')) assert_equal(minrelpath('..'), '..') assert_equal(minrelpath(n('aa/..')), '') assert_equal(minrelpath(n('aa/../bb')), 'bb') assert_equal(minrelpath(n('aa/bb/..')), 'aa') assert_equal(minrelpath(n('aa/bb/../..')), '') assert_equal(minrelpath(n('aa/bb/../cc/../dd')), n('aa/dd')) assert_equal(minrelpath(n('.././..')), n('../..')) assert_equal(minrelpath(n('aa/bb/.././../dd')), n('dd'))
def check_1(self): import os n = lambda path: path.replace('/',os.path.sep) assert_equal(minrelpath(n('aa/bb')),n('aa/bb')) assert_equal(minrelpath('..'),'..') assert_equal(minrelpath(n('aa/..')),'') assert_equal(minrelpath(n('aa/../bb')),'bb') assert_equal(minrelpath(n('aa/bb/..')),'aa') assert_equal(minrelpath(n('aa/bb/../..')),'') assert_equal(minrelpath(n('aa/bb/../cc/../dd')),n('aa/dd')) assert_equal(minrelpath(n('.././..')),n('../..')) assert_equal(minrelpath(n('aa/bb/.././../dd')),n('dd'))
def check_gpaths(self): local_path = minrelpath(os.path.join(os.path.dirname(__file__), '..')) ls = gpaths('command/*.py', local_path) assert os.path.join(local_path, 'command', 'build_src.py') in ls, ` ls ` f = gpaths('system_info.py', local_path) assert os.path.join(local_path, 'system_info.py') == f[0], ` f `
def test_gpaths(self): local_path = minrelpath(join(dirname(__file__), '..')) ls = gpaths('command/*.Dockerfile', local_path) assert_( join(local_path, 'command', 'build_src.Dockerfile') in ls, repr(ls)) f = gpaths('system_info.Dockerfile', local_path) assert_(join(local_path, 'system_info.Dockerfile') == f[0], repr(f))
def test_gpaths(self): local_path = minrelpath(join(dirname(__file__),'..')) ls = gpaths('command/*.py', local_path) assert join(local_path,'command','build_src.py') in ls,`ls` f = gpaths('system_info.py', local_path) assert join(local_path,'system_info.py')==f[0],`f`
def test_gpaths(self): local_path = minrelpath(join(dirname(__file__), "..")) ls = gpaths("command/*.py", local_path) assert_(join(local_path, "command", "build_src.py") in ls, ` ls `) f = gpaths("system_info.py", local_path) assert_(join(local_path, "system_info.py") == f[0], ` f `)
def test_gpaths(self): local_path = minrelpath(join(dirname(__file__), '..')) ls = gpaths('command/*.py', local_path) assert_(join(local_path, 'command', 'build_src.py') in ls, ` ls `) f = gpaths('system_info.py', local_path) assert_(join(local_path, 'system_info.py') == f[0], ` f `)
def test_gpaths(self): local_path = minrelpath(join(dirname(__file__), "..")) ls = gpaths("command/*.py", local_path) assert_(join(local_path, "command", "build_src.py") in ls, repr(ls)) f = gpaths("system_info.py", local_path) assert_(join(local_path, "system_info.py") == f[0], repr(f))