当前位置: 首页>>代码示例>>Python>>正文


Python Git.get_full_repo_directory方法代码示例

本文整理汇总了Python中app.project_type.git.Git.get_full_repo_directory方法的典型用法代码示例。如果您正苦于以下问题:Python Git.get_full_repo_directory方法的具体用法?Python Git.get_full_repo_directory怎么用?Python Git.get_full_repo_directory使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在app.project_type.git.Git的用法示例。


在下文中一共展示了Git.get_full_repo_directory方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_get_repo_directory_removes_colon_from_directory_if_exists

# 需要导入模块: from app.project_type.git import Git [as 别名]
# 或者: from app.project_type.git.Git import get_full_repo_directory [as 别名]
    def test_get_repo_directory_removes_colon_from_directory_if_exists(self):
        Configuration['repo_directory'] = '/tmp/repos'
        git = Git("some_remote_value", 'origin', 'ref/to/some/branch')

        repo_directory = git.get_full_repo_directory('ssh://source_control.cr.com:1234/master')

        self.assertEqual(repo_directory, '/tmp/repos/source_control.cr.com1234/master')
开发者ID:mdengler,项目名称:ClusterRunner,代码行数:9,代码来源:test_git.py

示例2: test_get_full_repo_directory

# 需要导入模块: from app.project_type.git import Git [as 别名]
# 或者: from app.project_type.git.Git import get_full_repo_directory [as 别名]
    def test_get_full_repo_directory(self):
        Configuration['repo_directory'] = '/home/cr_user/.clusterrunner/repos/master'
        url = 'http://scm.example.com/path/to/project'

        repo_path = Git.get_full_repo_directory(url)

        self.assertEqual(repo_path, '/home/cr_user/.clusterrunner/repos/master/scm.example.com/path/to/project')
开发者ID:mdengler,项目名称:ClusterRunner,代码行数:9,代码来源:test_git.py

示例3: test_get_full_repo_directory

# 需要导入模块: from app.project_type.git import Git [as 别名]
# 或者: from app.project_type.git.Git import get_full_repo_directory [as 别名]
    def test_get_full_repo_directory(self, url, expected_repo_path_without_base):
        Configuration['repo_directory'] = join(expanduser('~'), '.clusterrunner', 'repos')
        expected_repo_path = join(
            Configuration['repo_directory'], 
            expected_repo_path_without_base,
        )

        actual_repo_path = Git.get_full_repo_directory(url)
        self.assertEqual(expected_repo_path, actual_repo_path)
开发者ID:box,项目名称:ClusterRunner,代码行数:11,代码来源:test_git.py

示例4: test_get_repo_directory_removes_colon_from_directory_if_exists

# 需要导入模块: from app.project_type.git import Git [as 别名]
# 或者: from app.project_type.git.Git import get_full_repo_directory [as 别名]
    def test_get_repo_directory_removes_colon_from_directory_if_exists(self):
        Configuration['repo_directory'] = join(expanduser('~'), 'tmp', 'repos')
        git = Git("some_remote_value", 'origin', 'ref/to/some/branch')

        actual_repo_directory = git.get_full_repo_directory('ssh://source_control.cr.com:1234/master')
        expected_repo_directory = join(
            Configuration['repo_directory'],
            'source_control.cr.com1234',
            'master'
        )

        self.assertEqual(expected_repo_directory, actual_repo_directory)
开发者ID:Medium,项目名称:ClusterRunner,代码行数:14,代码来源:test_git.py

示例5: test_get_full_repo_directory

# 需要导入模块: from app.project_type.git import Git [as 别名]
# 或者: from app.project_type.git.Git import get_full_repo_directory [as 别名]
    def test_get_full_repo_directory(self):
        Configuration['repo_directory'] = join(expanduser('~'), '.clusterrunner', 'repos')
        url = 'http://scm.example.com/path/to/project'

        actual_repo_sys_path = Git.get_full_repo_directory(url)

        expected_repo_sys_path = join(
            Configuration['repo_directory'],
            'scm.example.com',
            'path',
            'to',
            'project',
        )
        self.assertEqual(expected_repo_sys_path, actual_repo_sys_path)
开发者ID:Medium,项目名称:ClusterRunner,代码行数:16,代码来源:test_git.py


注:本文中的app.project_type.git.Git.get_full_repo_directory方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。