{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "## Functional Test Documentation" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Generates documentation for fastai's functional tests" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "hide_input": true }, "outputs": [], "source": [ "from fastai.gen_doc.nbdoc import *\n", "from fastai.gen_doc.nbtest import * " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Find tests for any function/class" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "[`show_test`](/gen_doc.nbtest.html#show_test) and [`doctest`](/gen_doc.nbtest.html#doctest) searches for any implemented tests for a given fastai class or function \n", "\n", "For test writers: \n", "* Use this module to search for tests and get a better idea on which parts of the fastai api need more functional tests\n", "\n", "For fastai users: \n", "* Usage is similar to [`nbdoc.show_doc`](/gen_doc.nbdoc.html#show_doc) and [`nbdoc.doc`](/gen_doc.nbdoc.html#doc). \n", "* It's here to help you find associated tests for a given function can help understand usage. \n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Usage:" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "hide_input": true }, "outputs": [ { "data": { "text/markdown": [ "
show_test[source][test]show_test(**`elt`**) → `str`\n",
"\n",
"No tests found for show_test. To contribute a test please refer to this guide and this discussion.
doctest[source][test]doctest(**`elt`**)\n",
"\n",
"lookup_db[source][test]lookup_db(**`elt`**) → `List`\\[`Dict`\\[`KT`, `VT`\\]\\]\n",
"\n",
"No tests found for lookup_db. To contribute a test please refer to this guide and this discussion.
find_related_tests[source][test]find_related_tests(**`elt`**) → `Tuple`\\[`List`\\[`Dict`\\[`KT`, `VT`\\]\\], `List`\\[`Dict`\\[`KT`, `VT`\\]\\]\\]\n",
"\n",
"\n",
"\n",
"Searches `fastai/tests` folder for any test functions related to `elt` "
],
"text/plain": [
"find_test_matches[source][test]find_test_matches(**`elt`**, **`test_file`**:`Path`) → `Tuple`\\[`List`\\[`Dict`\\[`KT`, `VT`\\]\\], `List`\\[`Dict`\\[`KT`, `VT`\\]\\]\\]\n",
"\n",
"No tests found for find_test_matches. To contribute a test please refer to this guide and this discussion.
find_test_files[source][test]find_test_files(**`elt`**, **`exact_match`**:`bool`=***`False`***) → `List`\\[`Path`\\]\n",
"\n",
"No tests found for find_test_files. To contribute a test please refer to this guide and this discussion.
fuzzy_test_match[source][test]fuzzy_test_match(**`fn_name`**:`str`, **`lines`**:`List`\\[`Dict`\\[`KT`, `VT`\\]\\], **`rel_path`**:`str`) → `List`\\[[`TestFunctionMatch`](/gen_doc.nbtest.html#TestFunctionMatch)\\]\n",
"\n",
"