Example #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]
         ),
     )
Example #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]
         ),
     )
Example #3
0
 def test_should_map_false_to_pipeish_and_space(self):
     self.assertEqual(get_prefix([False, False]), PrefixTest.PIPE)
Example #4
0
 def test_should_map_true_to_two_spaces(self):
     self.assertEqual(get_prefix([False, True]), PrefixTest.SPACES)
Example #5
0
 def test_should_ignore_first_ancestor(self):
     self.assertEqual(get_prefix([False]), '')
Example #6
0
 def test_no_ancestors(self):
     self.assertEqual(get_prefix([]), '')