test/unittest_cwconfig.py
changeset 515 92d95b86263e
parent 13 bae30087db21
child 750 89e997bc2bf1
child 1015 b5fdad9208f8
equal deleted inserted replaced
514:87e76bce9452 515:92d95b86263e
     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):