예제 #1
0
 def test_ahead_1_commit(self) -> None:
     status = Status(self.dummy_path)
     status.branch = "master"
     status.ahead = 1
     # fmt: off
     assert status.describe() == [
         ui.green, "master", ui.reset, ui.blue, f"{UP}1 commit", ui.reset
     ]
예제 #2
0
파일: test_git_status.py 프로젝트: xzr/tsrc
 def test_diverged(self) -> None:
     status = Status(self.dummy_path)
     status.branch = "master"
     status.ahead = 1
     status.behind = 2
     # fmt: off
     assert status.describe() == [
         ui.green, "master", ui.reset,
         ui.blue, f"{UP}1 commit", ui.reset,
         ui.blue, f"{DOWN}2 commits", ui.reset,
     ]
예제 #3
0
 def test_up_to_date(self) -> None:
     status = Status(self.dummy_path)
     status.branch = "master"
     assert status.describe() == [ui.green, "master", ui.reset]