示例#1
0
 def test_index_state__order(self):
     self.assertEqual(
         "".join([
             term_color(u"✖3", tcolors.CONFLICT),
             term_color(u"●1", tcolors.STAGED),
             term_color(u"✚2", tcolors.CHANGED),
         ]),
         index_state(0, 1, 2, 3)
     )
示例#2
0
 def test_index_state__conflicts(self):
     self.assertEqual(
         term_color(u"✖5", tcolors.CONFLICT),
         index_state(0, 0, 0, 5)
     )
示例#3
0
 def test_index_state__changed(self):
     self.assertEqual(
         term_color(u"✚4", tcolors.CHANGED),
         index_state(0, 0, 4, 0)
     )
示例#4
0
 def test_index_state__staged(self):
     self.assertEqual(
         term_color(u"●3", tcolors.STAGED),
         index_state(0, 3, 0, 0)
     )
示例#5
0
 def test_index_state__untracked(self):
     self.assertEqual(
         term_color(u"…", tcolors.UNTRACKED),
         index_state(2, 0, 0, 0)
     )
示例#6
0
 def test_index_state__clean(self):
     self.assertEqual(
         term_color(u"✔ ", tcolors.CLEAN),
         index_state(0, 0, 0, 0)
     )