equal
deleted
inserted
replaced
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): |