Beispiel #1
0
 def test_get_status_vector__conflicts(self):
     expected = dict(branch=None, ahead=0, behind=0, untracked=0, staged=0,
                     changed=0, conflicts=1)
     self.assertDictEqual(
         expected,
         get_status_vector("UU zsh/git-prompt/README.rst")
     )
Beispiel #2
0
 def test_get_status_vector__ahead_and_behind(self):
     expected = dict(branch="master", ahead=2, behind=3, untracked=0,
                     staged=0, changed=0, conflicts=0)
     self.assertDictEqual(
         expected,
         get_status_vector("## master...origin/master [ahead 2, behind 3]")
     )
Beispiel #3
0
 def test_get_status_vector__untracked(self):
     expected = dict(branch=None, ahead=0, behind=0, untracked=1, staged=0,
                     changed=0, conflicts=0)
     self.assertDictEqual(
         expected,
         get_status_vector("?? zsh/git-prompt/tests_gitstatus.py")
     )
Beispiel #4
0
 def test_get_status_vector__upto_date_and_clean(self):
     expected = dict(branch="branch-name", ahead=0, behind=0, untracked=0,
                     staged=0, changed=0, conflicts=0)
     self.assertDictEqual(expected, get_status_vector("## branch-name"))