def testGetTreeSubdir(self): """Test getting tree with subdirs.""" d1 = self.cov_dir = croc.CoveredDir('/a') d2 = self.cov_dir = croc.CoveredDir('/a/b') d3 = self.cov_dir = croc.CoveredDir('/a/c') d4 = self.cov_dir = croc.CoveredDir('/a/b/d') d5 = self.cov_dir = croc.CoveredDir('/a/b/e') d1.subdirs = {'/a/b': d2, '/a/c': d3} d2.subdirs = {'/a/b/d': d4, '/a/b/e': d5} self.assertEqual(d1.GetTree(), 'a/\n b/\n d/\n e/\n c/')
def setUp(self): self.cov_dir = croc.CoveredDir('/a/b/c')