test/unittest_cwconfig.py
branch3.1
changeset 2027 85eae6a79f75
parent 515 92d95b86263e
child 750 89e997bc2bf1
child 1015 b5fdad9208f8
equal deleted inserted replaced
1371:a81d3babb582 2027:85eae6a79f75
     6 
     6 
     7 from cubicweb.devtools import ApptestConfiguration
     7 from cubicweb.devtools import ApptestConfiguration
     8 
     8 
     9 def unabsolutize(path):
     9 def unabsolutize(path):
    10     parts = path.split(os.sep)
    10     parts = path.split(os.sep)
    11     for i, part in enumerate(parts):
    11     for i, part in reversed(tuple(enumerate(parts))):
    12         if part in ('cubicweb', 'cubes', 'cubes'):
    12         if part in ('cubicweb', 'cubes', 'cubes'):
    13             return '/'.join(parts[i+1:])
    13             return '/'.join(parts[i+1:])
    14     raise Exception('duh? %s' % path)
    14     raise Exception('duh? %s' % path)
    15     
    15     
    16 class CubicWebConfigurationTC(TestCase):
    16 class CubicWebConfigurationTC(TestCase):