示例#1
0
 def testSourceIsRoot(self):
     templar_path = 'home/project/templar/__main__.py'
     source_path = 'home'
     expect = [
         'home',
     ]
     self.assertEqual(get_paths(templar_path, source_path), expect)
示例#2
0
 def testSourceIsRoot(self):
     templar_path = 'home/project/templar/__main__.py'
     source_path = 'home'
     expect = [
         'home',
     ]
     self.assertEqual(get_paths(templar_path, source_path), expect)
示例#3
0
 def testTemplarIsRoot(self):
     templar_path = 'templar/__main__.py'
     source_path = 'templar/test/src/markdown'
     expect = [
         'templar',
         'templar/test',
         'templar/test/src',
         'templar/test/src/markdown',
     ]
     self.assertEqual(get_paths(templar_path, source_path), expect)
示例#4
0
 def testTemplarAncestorIsNotRoot(self):
     templar_path = 'home/project/templar/__main__.py'
     source_path = 'home/project/test/src/markdown'
     expect = [
         'home/project',
         'home/project/test',
         'home/project/test/src',
         'home/project/test/src/markdown',
     ]
     self.assertEqual(get_paths(templar_path, source_path), expect)
示例#5
0
 def testTemplarIsRoot(self):
     templar_path = 'templar/__main__.py'
     source_path = 'templar/test/src/markdown'
     expect = [
         'templar',
         'templar/test',
         'templar/test/src',
         'templar/test/src/markdown',
     ]
     self.assertEqual(get_paths(templar_path, source_path), expect)
示例#6
0
 def testTemplarAncestorIsNotRoot(self):
     templar_path = 'home/project/templar/__main__.py'
     source_path = 'home/project/test/src/markdown'
     expect = [
         'home/project',
         'home/project/test',
         'home/project/test/src',
         'home/project/test/src/markdown',
     ]
     self.assertEqual(get_paths(templar_path, source_path), expect)