예제 #1
0
 def test_different_roots(self):
     sab = path.Path('a/b', path.Root.srcdir)
     sabc = path.Path('a/b/c', path.Root.srcdir)
     bab = path.Path('a/b', path.Root.builddir)
     babc = path.Path('a/b/c', path.Root.builddir)
     self.assertEqual(path.uniquetrees([sabc, bab, babc, sab]), [sab, bab])
예제 #2
0
 def test_mixed(self):
     ab = path.Path('a/b')
     abc = path.Path('a/b/c')
     ad = path.Path('a/d')
     cab = path.Path('c/a/b')
     self.assertEqual(path.uniquetrees([abc, ab, cab, ad]), [ab, ad, cab])
예제 #3
0
 def test_disjoint(self):
     a = path.Path('a')
     bcd = path.Path('b/c/d')
     ef = path.Path('e/f')
     self.assertEqual(path.uniquetrees([bcd, ef, a]), [a, bcd, ef])
예제 #4
0
 def test_common_base(self):
     a = path.Path('a')
     ab = path.Path('a/b')
     abc = path.Path('a/b/c')
     aca = path.Path('a/c/a')
     self.assertEqual(path.uniquetrees([abc, aca, a, ab]), [a])
예제 #5
0
 def test_empty(self):
     self.assertEqual(path.uniquetrees([]), [])