예제 #1
0
파일: repo.py 프로젝트: ActivKonnect/castor
    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)
예제 #2
0
파일: repo.py 프로젝트: VincentLoy/castor
    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)
예제 #3
0
파일: repo.py 프로젝트: ActivKonnect/castor
 def test_find_repo_none(self):
     self.assertIsNone(find_repo(__file__))