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