def test_find_repo_1(self): test_root = path.join(ASSETS_ROOT, 'test1') stock_git = path.join(test_root, 'git') tmp_git = path.join(test_root, '.git') rename(stock_git, tmp_git) try: initial_path = path.join(test_root, 'lodge', 'some', 'path') found_path = find_repo(initial_path) self.assertEqual(test_root, found_path) finally: rename(tmp_git, stock_git)
def test_find_repo_1(self): test_root = path.join(ASSETS_ROOT, "test1") stock_git = path.join(test_root, "git") tmp_git = path.join(test_root, ".git") rename(stock_git, tmp_git) try: initial_path = path.join(test_root, "lodge", "some", "path") found_path = find_repo(initial_path) self.assertEqual(test_root, found_path) finally: rename(tmp_git, stock_git)
def test_find_repo_none(self): self.assertIsNone(find_repo(__file__))