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


Python factory.create_git_repo函数代码示例

本文整理汇总了Python中tests.helpers.factory.create_git_repo函数的典型用法代码示例。如果您正苦于以下问题:Python create_git_repo函数的具体用法?Python create_git_repo怎么用?Python create_git_repo使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: test_empty_branch_type_list_raises_usage

 def test_empty_branch_type_list_raises_usage(self):
     create_git_repo(self)
     gitflow = GitFlow().init()
     self.assertRaises(Usage, gitflow.list, 'feature', 'name', False, False)
     self.assertRaises(Usage, gitflow.list, 'release', 'version', False, False)
     self.assertRaises(Usage, gitflow.list, 'hotfix', 'version', False, False)
     self.assertRaises(Usage, gitflow.list, 'support', 'version', False, False)
开发者ID:OBdA,项目名称:gitflow,代码行数:7,代码来源:test_core.py

示例2: test_detect_branch_types

    def test_detect_branch_types(self):
        create_git_repo(self)
        gitflow = GitFlow()

        # The types that "ship" with git-flow
        self.assertIn('feature', gitflow.managers)
        self.assertIn('release', gitflow.managers)
        self.assertIn('hotfix', gitflow.managers)
        self.assertIn('support', gitflow.managers)
开发者ID:OBdA,项目名称:gitflow,代码行数:9,代码来源:test_core.py

示例3: test_detect_custom_branch_types

    def test_detect_custom_branch_types(self):
        create_git_repo(self)
        # Declare a custom branch type inline
        class FooBarManager(BranchManager):
            identifier = 'foobar'
            DEFAULT_PREFIX = 'xyz/'

        gitflow = GitFlow()
        self.assertIn('foobar', gitflow.managers)
开发者ID:OBdA,项目名称:gitflow,代码行数:9,代码来源:test_core.py

示例4: test_create

    def test_create(self):
        create_git_repo(self)
        gitflow = GitFlow()

        self.assertEquals([], self.repo.branches)

        gitflow.init()

        self.assertEquals(['develop', 'master'],
                [b.name for b in self.repo.branches])

        fb = gitflow.create('feature', 'foo')
开发者ID:OBdA,项目名称:gitflow,代码行数:12,代码来源:test_creation.py

示例5: test_gitflow_init_creates_initial_commit

 def test_gitflow_init_creates_initial_commit(self):
     repo = create_git_repo(self)
     all_commits_before_init = all_commits(repo)
     gitflow = GitFlow(repo).init()
     all_commits_after_init = all_commits(repo)
     self.assertNotEquals(all_commits_before_init, all_commits_after_init)
     self.assertEquals('Initial commit', repo.heads.master.commit.message)
开发者ID:OBdA,项目名称:gitflow,代码行数:7,代码来源:test_core.py

示例6: test_release_branch_origin

 def test_release_branch_origin(self):
     repo = create_git_repo(self)
     gitflow = GitFlow(repo).init()
     mgr = ReleaseBranchManager(gitflow)
     new_branch = mgr.create('1.1')
     self.assertEqual(new_branch.commit,
             gitflow.repo.branches['develop'].commit)
开发者ID:opicacek,项目名称:gitflow,代码行数:7,代码来源:test_branches.py

示例7: test_create_release_changes_active_branch

    def test_create_release_changes_active_branch(self):
        repo = create_git_repo(self)
        gitflow = GitFlow(repo).init()
        mgr = ReleaseBranchManager(gitflow)

        self.assertEquals('develop', repo.active_branch.name)
        mgr.create('1.0')
        self.assertEquals('release/1.0', repo.active_branch.name)
开发者ID:opicacek,项目名称:gitflow,代码行数:8,代码来源:test_branches.py

示例8: test_finish_release_rebase

 def test_finish_release_rebase(self):
     repo = create_git_repo(self)
     gitflow = GitFlow(repo).init()
     mgr = ReleaseBranchManager(gitflow)
     mgr.create('1.0')
     self.assertRaises(
         Exception,
         mgr.finish, '1.0', rebase=True)
开发者ID:chassing,项目名称:gitflow,代码行数:8,代码来源:test_branches.py

示例9: test_finish_release_rebase

 def test_finish_release_rebase(self):
     repo = create_git_repo(self)
     gitflow = GitFlow(repo).init()
     mgr = ReleaseBranchManager(gitflow)
     mgr.create('1.0')
     self.assertRaisesRegexp(
         AssertionError, "does not make any sense",
         mgr.finish, '1.0', rebase=True)
开发者ID:opicacek,项目名称:gitflow,代码行数:8,代码来源:test_branches.py

示例10: test_feature_list_verbose_no_commits

 def test_feature_list_verbose_no_commits(self):
     repo = create_git_repo(self)
     gitflow = GitFlow(repo).init()
     repo.create_head('feature/wow', 'HEAD')
     stdout = runGitFlow('feature', 'list', '--verbose', capture=1)
     expected = [
       '  wow (no commits yet)'
       ]
     self.assertEqual(stdout.splitlines(), expected)
开发者ID:opicacek,项目名称:gitflow,代码行数:9,代码来源:test_bin.py

示例11: test_create_branches

 def test_create_branches(self):
     repo = create_git_repo(self)
     gitflow = GitFlow(repo).init()
     gitflow.create('feature', 'foo', None, fetch=False)
     self.assertIn('feature/foo',
             [h.name for h in gitflow.repo.branches])
     gitflow.create('release', '1.0', None, fetch=False)
     self.assertIn('release/1.0',
             [h.name for h in gitflow.repo.branches])
开发者ID:OBdA,项目名称:gitflow,代码行数:9,代码来源:test_core.py

示例12: _test_create_branches_from_alt_base

 def _test_create_branches_from_alt_base(self):
     repo = create_git_repo(self)
     gitflow = GitFlow(repo).init()
     gitflow.create('feature', 'foo', 'master', fetch=False)
     self.assertIn('feature/foo',
             [h.name for h in gitflow.repo.branches])
     gitflow.repo.index.commit('Foo')
     gitflow.create('release', '1.0', 'feature/foo', fetch=False)
     self.assertIn('release/1.0',
             [h.name for h in gitflow.repo.branches])
开发者ID:OBdA,项目名称:gitflow,代码行数:10,代码来源:test_core.py

示例13: test_create_new_feature_branch

 def test_create_new_feature_branch(self):
     repo = create_git_repo(self)
     gitflow = GitFlow(repo).init()
     mgr = FeatureBranchManager(gitflow)
     self.assertEqual(0, len(mgr.list()))
     new_branch = mgr.create('foo')
     self.assertEqual(1, len(mgr.list()))
     self.assertEqual('feature/foo', mgr.list()[0].name)
     self.assertEqual(new_branch.commit,
             gitflow.repo.branches['develop'].commit)
开发者ID:opicacek,项目名称:gitflow,代码行数:10,代码来源:test_branches.py

示例14: test_create_new_support_branch

 def test_create_new_support_branch(self):
     repo = create_git_repo(self)
     gitflow = GitFlow(repo).init()
     mgr = SupportBranchManager(gitflow)
     self.assertEqual(0, len(mgr.list()))
     new_branch = mgr.create('1.x')
     self.assertEqual(1, len(mgr.list()))
     self.assertEqual('support/1.x', mgr.list()[0].name)
     self.assertEqual(new_branch.commit,
             gitflow.repo.branches['master'].commit)
开发者ID:opicacek,项目名称:gitflow,代码行数:10,代码来源:test_branches.py

示例15: test_create_new_release_branch

 def test_create_new_release_branch(self):
     repo = create_git_repo(self)
     gitflow = GitFlow(repo).init()
     mgr = ReleaseBranchManager(gitflow)
     self.assertEqual(0, len(mgr.list()))
     new_branch = mgr.create('3.14-beta5')
     self.assertEqual(1, len(mgr.list()))
     self.assertEqual('release/3.14-beta5', mgr.list()[0].name)
     self.assertEqual(new_branch.commit,
             gitflow.repo.branches['develop'].commit)
开发者ID:opicacek,项目名称:gitflow,代码行数:10,代码来源:test_branches.py


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