Helper functions to search for api tests
Functional Test Documentation¶
Generates documentation for fastai's functional tests
Find tests for any function/class¶
show_test
and doctest
searches for any implemented tests for a given fastai class or function
For test writers:
- Use this module to search for tests and get a better idea on which parts of the fastai api need more functional tests
For fastai users:
- Usage is similar to
nbdoc.show_doc
andnbdoc.doc
. - It's here to help you find associated tests for a given function can help understand usage.
Usage:¶
Show tests from function
from fastai.basic_train import Learner
show_test(Learner.fit)
Show tests from a Class
from fastai.basic_data import DataBunch
show_test(DataBunch)
from fastai.text.data import TextList
show_test(TextList)
Different test types¶
Above, you will see 2 different test types: Tests found for...
and Some other tests...
Tests found for...
- Searches for function matches intest_registry.json
. This json file is populated fromdoctest.this_tests
calls.Some other tests...
- Returns any test function where the fastai function in called inside the body