Exemplo n.º 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)
     )
Exemplo n.º 2
0
 def test_index_state__conflicts(self):
     self.assertEqual(
         term_color(u"✖5", tcolors.CONFLICT),
         index_state(0, 0, 0, 5)
     )
Exemplo n.º 3
0
 def test_index_state__changed(self):
     self.assertEqual(
         term_color(u"✚4", tcolors.CHANGED),
         index_state(0, 0, 4, 0)
     )
Exemplo n.º 4
0
 def test_index_state__staged(self):
     self.assertEqual(
         term_color(u"●3", tcolors.STAGED),
         index_state(0, 3, 0, 0)
     )
Exemplo n.º 5
0
 def test_index_state__untracked(self):
     self.assertEqual(
         term_color(u"…", tcolors.UNTRACKED),
         index_state(2, 0, 0, 0)
     )
Exemplo n.º 6
0
 def test_index_state__clean(self):
     self.assertEqual(
         term_color(u"✔ ", tcolors.CLEAN),
         index_state(0, 0, 0, 0)
     )