class_docstr: Class containing unit tests for nltk.tgrep.
class_docstr_tok: ["Class","containing","unit","tests","for","nltk.tgrep","."]
docstr: Test error handling of undefined tgrep operators.
docstr_tok: ["Test","error","handling","of","undefined","tgrep","operators","."]
code: def test_bad_operator(self):
      """
      Test error handling of undefined tgrep operators.
      """
      tree = ParentedTree.fromstring("(S (A (T x)) (B (N x)))")
      self.assertRaises(
          tgrep.TgrepException,
          list,
          tgrep.tgrep_positions("* >>> S", [tree]),
      )
  
imports: import unittest
  from nltk import tgrep
  from nltk.tree import ParentedTree
label_desc: Use image node_id 18 for calling the TestSequenceFunctions obj's underlying member method code with example usage: obj.test_bad_operator() without return types