def test_find_plugin_roots(self): root = tempfile.mkdtemp() a = os.path.join(root, 'a') b = os.path.join(a, 'b') c = os.path.join(root, 'c') os.mkdir(a) os.mkdir(b) os.mkdir(c) touch(os.path.join(a, 'toto.plug')) touch(os.path.join(b, 'titi.plug')) touch(os.path.join(root, 'tutu.plug')) roots = find_roots(root) self.assertIn(root, roots) self.assertIn(a, roots) self.assertIn(b, roots) self.assertNotIn(c, roots)
def test_find_plugin_roots(): root = tempfile.mkdtemp() a = os.path.join(root, 'a') b = os.path.join(a, 'b') c = os.path.join(root, 'c') os.mkdir(a) os.mkdir(b) os.mkdir(c) touch(os.path.join(a, 'toto.plug')) touch(os.path.join(b, 'titi.plug')) touch(os.path.join(root, 'tutu.plug')) roots = find_roots(root) assert root in roots assert a in roots assert b in roots assert c not in roots
def test_find_plugin_roots(self): root = tempfile.mkdtemp() a = os.path.join(root, "a") b = os.path.join(a, "b") c = os.path.join(root, "c") os.mkdir(a) os.mkdir(b) os.mkdir(c) touch(os.path.join(a, "toto.plug")) touch(os.path.join(b, "titi.plug")) touch(os.path.join(root, "tutu.plug")) roots = find_roots(root) self.assertIn(root, roots) self.assertIn(a, roots) self.assertIn(b, roots) self.assertNotIn(c, roots)
def test_find_plugin_roots(): root = tempfile.mkdtemp() a = os.path.join(root, "a") b = os.path.join(a, "b") c = os.path.join(root, "c") os.mkdir(a) os.mkdir(b) os.mkdir(c) touch(os.path.join(a, "toto.plug")) touch(os.path.join(b, "titi.plug")) touch(os.path.join(root, "tutu.plug")) roots = find_roots(root) assert root in roots assert a in roots assert b in roots assert c not in roots