示例#1
0
 def test_finish_in_new_sandbox_without_commit(self):
     sandbox = create_sandbox(self)
     gitflow = GitFlow(sandbox).init()
     gitflow.create('feature', 'wow-feature', base=None, fetch=False)
     gitflow.finish('feature', 'wow-feature', False, False, False, False,
                    None)
     self.assertNotIn('feature/wow-feature', gitflow.repo.branches)
示例#2
0
 def test_gitflow_init_inits_underlying_git_repo(self):
     sandbox = create_sandbox(self)
     gitflow = GitFlow(sandbox)
     dot_git_dir = os.path.join(sandbox, '.git')
     self.assertFalse(os.path.exists(dot_git_dir))
     gitflow.init()
     self.assertTrue(os.path.exists(dot_git_dir))
     self.assertTrue(gitflow.is_initialized())
示例#3
0
文件: test_core.py 项目: OBdA/gitflow
 def test_finish_in_new_sandbox(self):
     sandbox = create_sandbox(self)
     gitflow = GitFlow(sandbox).init()
     gitflow.create('feature', 'wow-feature', base=None, fetch=False)
     self.assertEqual(gitflow.repo.active_branch.name, 'feature/wow-feature')
     fake_commit(gitflow.repo, 'Yet another commit')
     gitflow.finish('feature', 'wow-feature', False, False, False, False, None)
     self.assertNotIn('feature/wow-feature', gitflow.repo.branches)
示例#4
0
文件: test_core.py 项目: OBdA/gitflow
 def test_gitflow_init_inits_underlying_git_repo(self):
     sandbox = create_sandbox(self)
     gitflow = GitFlow(sandbox)
     dot_git_dir = os.path.join(sandbox, '.git')
     self.assertFalse(os.path.exists(dot_git_dir))
     gitflow.init()
     self.assertTrue(os.path.exists(dot_git_dir))
     self.assertTrue(gitflow.is_initialized())
示例#5
0
 def test_finish_in_new_sandbox(self):
     sandbox = create_sandbox(self)
     gitflow = GitFlow(sandbox).init()
     gitflow.create('feature', 'wow-feature', base=None, fetch=False)
     self.assertEqual(gitflow.repo.active_branch.name,
                      'feature/wow-feature')
     fake_commit(gitflow.repo, 'Yet another commit')
     gitflow.finish('feature', 'wow-feature', False, False, False, False,
                    None)
     self.assertNotIn('feature/wow-feature', gitflow.repo.branches)
示例#6
0
 def test_create_in_new_sandbox(self):
     sandbox = create_sandbox(self)
     gitflow = GitFlow(sandbox).init()
     gitflow.create('feature', 'wow-feature', base=None, fetch=False)
     self.assertIn('feature/wow-feature', gitflow.repo.branches)
示例#7
0
 def test_branch_names_fails_in_new_sandbox(self):
     sandbox = create_sandbox(self)
     gitflow = GitFlow(sandbox)
     self.assertRaises(NotInitialized, gitflow.branch_names)
示例#8
0
 def test_gitflow_required_remote_raises_error_on_nonexisting_remote(self):
     sandbox = create_sandbox(self)
     gitflow = GitFlow(sandbox).init()
     self.assertRaises(NoSuchRemoteError, gitflow.require_remote,
                       'some-remote')
示例#9
0
文件: test_core.py 项目: OBdA/gitflow
 def test_gitflow_required_remote_raises_error_on_nonexisting_remote(self):
     sandbox = create_sandbox(self)
     gitflow = GitFlow(sandbox).init()
     self.assertRaises(NoSuchRemoteError,
                       gitflow.require_remote, 'some-remote')
示例#10
0
文件: test_core.py 项目: OBdA/gitflow
 def test_new_repo_has_no_staged_commits(self):
     sandbox = create_sandbox(self)
     gitflow = GitFlow(sandbox).init()
     self.assertFalse(gitflow.has_staged_commits())
示例#11
0
文件: test_core.py 项目: OBdA/gitflow
 def test_new_repo_is_not_dirty(self):
     sandbox = create_sandbox(self)
     gitflow = GitFlow(sandbox).init()
     self.assertFalse(gitflow.is_dirty())
示例#12
0
文件: test_core.py 项目: OBdA/gitflow
 def test_finish_in_new_sandbox_without_commit(self):
     sandbox = create_sandbox(self)
     gitflow = GitFlow(sandbox).init()
     gitflow.create('feature', 'wow-feature', base=None, fetch=False)
     gitflow.finish('feature', 'wow-feature', False, False, False, False, None)
     self.assertNotIn('feature/wow-feature', gitflow.repo.branches)
示例#13
0
文件: test_core.py 项目: OBdA/gitflow
 def test_create_in_new_sandbox(self):
     sandbox = create_sandbox(self)
     gitflow = GitFlow(sandbox).init()
     gitflow.create('feature', 'wow-feature', base=None, fetch=False)
     self.assertIn('feature/wow-feature', gitflow.repo.branches)
示例#14
0
文件: test_core.py 项目: OBdA/gitflow
 def test_branch_names_fails_in_new_sandbox(self):
     sandbox = create_sandbox(self)
     gitflow = GitFlow(sandbox)
     self.assertRaises(NotInitialized, gitflow.branch_names)
示例#15
0
 def test_new_repo_is_not_dirty(self):
     sandbox = create_sandbox(self)
     gitflow = GitFlow(sandbox).init()
     self.assertFalse(gitflow.is_dirty())
示例#16
0
 def test_gitflow_cannot_get_status_on_empty_sandbox(self):
     sandbox = create_sandbox(self)
     gitflow = GitFlow(sandbox)
     self.assertRaises(NotInitialized, gitflow.status)
示例#17
0
 def test_new_repo_has_no_staged_commits(self):
     sandbox = create_sandbox(self)
     gitflow = GitFlow(sandbox).init()
     self.assertFalse(gitflow.has_staged_commits())
示例#18
0
文件: test_core.py 项目: OBdA/gitflow
 def test_gitflow_cannot_get_status_on_empty_sandbox(self):
     sandbox = create_sandbox(self)
     gitflow = GitFlow(sandbox)
     self.assertRaises(NotInitialized, gitflow.status)