Commit 24ceb07e by Will Roberts

nltk/tgrep.py: run module doctests

parent 3dc0a79c
...@@ -909,3 +909,8 @@ def tgrep_nodes(tree, tgrep_string, search_leaves = True): ...@@ -909,3 +909,8 @@ def tgrep_nodes(tree, tgrep_string, search_leaves = True):
''' '''
return [tree[position] for position in tgrep_positions(tree, tgrep_string, return [tree[position] for position in tgrep_positions(tree, tgrep_string,
search_leaves)] search_leaves)]
# run module doctests
if __name__ == "__main__":
import doctest
doctest.testmod(optionflags=doctest.NORMALIZE_WHITESPACE)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment