'Test that tgrep search strings handles bytes and strs the same
way.'

def test_node_encoding(self):

    tree = ParentedTree.fromstring(u'(S    (NP    (DT    the)    (JJ    big)    (NN    dog))    (VP    bit)    (NP    (DT    a)    (NN    cat)))')
    self.assertEqual(list(tgrep.tgrep_positions(b(u'NN'), [tree])), list(tgrep.tgrep_positions(u'NN', [tree])))
    self.assertEqual(list(tgrep.tgrep_nodes(b(u'NN'), [tree])), list(tgrep.tgrep_nodes(u'NN', [tree])))
    self.assertEqual(list(tgrep.tgrep_positions(b(u'NN|JJ'), [tree])), list(tgrep.tgrep_positions(u'NN|JJ', [tree])))
