def test_comments(self):
        tree = ParentedTree.fromstring('(S (NN x) (NP x) (NN x))')
        search1 = '''
        @ NP /^NP/;
        @ NN /^NN/;
        @NN
        '''
        self.assertEqual(list(tgrep.tgrep_positions(search1, [tree])),
                         [[(0,), (2,)]])
        search2 = '''
        # macros
        @ NP /^NP/;
        @ NN /^NN/;

        # search string
        @NN
        '''
        self.assertEqual(list(tgrep.tgrep_positions(search2, [tree])),
                         [[(0,), (2,)]])
Test that comments are correctly filtered out of tgrep search
dataset/ETHPy150Open nltk/nltk/nltk/test/unit/test_tgrep.py/TestSequenceFunctions.test_comments