def test_rel_sister_nodes(self):
        tree = ParentedTree.fromstring('(S (A x) (B x) (C x))')
        self.assertEqual(list(tgrep.tgrep_positions('* $. B', [tree])),  [[(0,)]])
        self.assertEqual(list(tgrep.tgrep_positions('* $.. B', [tree])), [[(0,)]])
        self.assertEqual(list(tgrep.tgrep_positions('* $, B', [tree])),  [[(2,)]])
        self.assertEqual(list(tgrep.tgrep_positions('* $,, B', [tree])), [[(2,)]])
        self.assertEqual(list(tgrep.tgrep_positions('* $ B', [tree])),   [[(0,), (2,)]])
Test matching sister nodes in a tree.
dataset/ETHPy150Open nltk/nltk/nltk/test/unit/test_tgrep.py/TestSequenceFunctions.test_rel_sister_nodes