Exemple #1
0
 def testAbsolutify(self):
     layout = mod.BaseTestLayout()
     self.assertEquals(layout.absolutify("foo/bar.py"),
                       "%s/foo/bar.py" % proj_root)
     self.assertEquals(layout.absolutify("/tmp/foo/bar.py"),
                       "/tmp/foo/bar.py")
Exemple #2
0
 def testRelatize(self):
     layout = mod.BaseTestLayout()
     self.assertEquals(layout.relatize("%s/foo/bar.py" % proj_root),
                       "foo/bar.py")
     self.assertEquals(layout.relatize("foo/bar.py"), "foo/bar.py")
Exemple #3
0
 def testGlueWithUnderUnderInits(self):
     layout = mod.BaseTestLayout()
     self.assertEquals(layout.glue_parts(['foo'], True), 'foo/__init__.py')
     self.assertEquals(layout.glue_parts(['foo', 'bar', 'baz'], True),
                       'foo/bar/baz/__init__.py')
     self.assertEquals(layout.glue_parts([], True), '__init__.py')
Exemple #4
0
 def testGlueSimple(self):
     layout = mod.BaseTestLayout()
     self.assertEquals(layout.glue_parts(['foo']), 'foo.py')
     self.assertEquals(layout.glue_parts(['foo', 'bar', 'baz']),
                       'foo/bar/baz.py')
     self.assertRaises(IndexError, layout.glue_parts, [])
Exemple #5
0
 def testBreakDownWithUnderUnderInits(self):
     layout = mod.BaseTestLayout()
     self.assertEquals(layout.break_down('__init__.py'), [])
     self.assertEquals(layout.break_down('foo/__init__.py'), ['foo'])
     self.assertEquals(layout.break_down('foo/bar/baz/__init__.py'),
                       ['foo', 'bar', 'baz'])
Exemple #6
0
 def testBreakDownSimple(self):
     layout = mod.BaseTestLayout()
     self.assertEquals(layout.break_down('foo.py'), ['foo'])
     self.assertEquals(layout.break_down('foo/bar.py'), ['foo', 'bar'])
     self.assertEquals(layout.break_down('foo/bar/baz.py'),
                       ['foo', 'bar', 'baz'])