Skip to content

Commit

Permalink
make normalize_whitespace true by default, to simplify docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenbird committed Nov 5, 2011
1 parent c1b0e65 commit 637d190
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion nltk/test/doctest_driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,17 @@
import __future__
COMPILER_FLAGS = __future__.division.compiler_flag

###########################################################################
# Fix for unicode docstrings and Python 2*
###########################################################################

if __name__ == "__main__":
import sys
reload(sys)
sys.setdefaultencoding("UTF-8")
import doctest
doctest.testmod()

###########################################################################
# Monkey-Patch to fix Doctest
###########################################################################
Expand Down Expand Up @@ -963,7 +974,7 @@ def update(names, optionflags, verbosity):
help="Allow \"...\" to be used for ellipsis in the "
"expected output.")
NORMWS_OPT = Option("--normalize_whitespace",
action="store_const", dest="normws", const=1, default=0,
action="store_const", dest="normws", const=1, default=1,
help="Ignore whitespace differences between "
"the expected output and the actual output.")

Expand Down

0 comments on commit 637d190

Please sign in to comment.