Ejemplo n.º 1
0
 def test_should_map_mixed_chars(self):
     self.assertEqual(
         get_prefix([False, True, False, True, False]),
         "".join(
             [PrefixTest.SPACES, PrefixTest.PIPE, PrefixTest.SPACES, PrefixTest.PIPE]
         ),
     )
Ejemplo n.º 2
0
 def test_should_map_several_chars(self):
     self.assertEqual(
         get_prefix([False, False, False, False, False]),
         "".join(
             [PrefixTest.PIPE, PrefixTest.PIPE, PrefixTest.PIPE, PrefixTest.PIPE]
         ),
     )
Ejemplo n.º 3
0
 def test_should_map_false_to_pipeish_and_space(self):
     self.assertEqual(get_prefix([False, False]), PrefixTest.PIPE)
Ejemplo n.º 4
0
 def test_should_map_true_to_two_spaces(self):
     self.assertEqual(get_prefix([False, True]), PrefixTest.SPACES)
Ejemplo n.º 5
0
 def test_should_ignore_first_ancestor(self):
     self.assertEqual(get_prefix([False]), '')
Ejemplo n.º 6
0
 def test_no_ancestors(self):
     self.assertEqual(get_prefix([]), '')