예제 #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)