nltk.test package¶
Subpackages¶
- nltk.test.unit package
- Submodules
- nltk.test.unit.test_2x_compat module
- nltk.test.unit.test_classify module
- nltk.test.unit.test_collocations module
- nltk.test.unit.test_corpora module
- nltk.test.unit.test_corpus_views module
- nltk.test.unit.test_hmm module
- nltk.test.unit.test_naivebayes module
- nltk.test.unit.test_seekable_unicode_stream_reader module
- nltk.test.unit.test_stem module
- nltk.test.unit.test_tag module
- nltk.test.unit.utils module
- Module contents
Submodules¶
nltk.test.align_fixt module¶
nltk.test.all module¶
Test suite that runs all NLTK tests.
This module, nltk.test.all, is named as the NLTK test_suite in the project’s setup-eggs.py file. Here, we create a test suite that runs all of our doctests, and return it for processing by the setuptools test harness.
nltk.test.corpus_fixt module¶
nltk.test.doctest_nose_plugin module¶
- class nltk.test.doctest_nose_plugin.DoctestFix[source]¶
Bases: nltk.test.doctest_nose_plugin.DoctestPluginHelper, nose.plugins.doctests.Doctest
- class nltk.test.doctest_nose_plugin.DoctestPluginHelper[source]¶
Bases: builtins.object
This mixin adds print_function future import to all test cases.
- It also adds support for:
‘#doctest +ALLOW_UNICODE’ option that makes DocTestCase think u’foo’ == ‘foo’.
‘#doctest doctestencoding=utf-8’ option that changes the encoding of doctest files
- OPTION_BY_NAME = ('doctestencoding',)¶
nltk.test.gluesemantics_malt_fixt module¶
nltk.test.runtests module¶
Module contents¶
Unit tests for the NLTK modules. These tests are intended to ensure that source code changes don’t accidentally introduce bugs. For instructions, please see:
../../web/dev/local_testing.rst
https://github.com/nltk/nltk/blob/master/web/dev/local_testing.rst