test_case
allennlp.common.testing.test_case
TEST_DIR#
TEST_DIR = tempfile.mkdtemp(prefix="allennlp_tests")
AllenNlpTestCase#
class AllenNlpTestCase
A custom testing class that disables some of the more verbose AllenNLP logging and that creates and destroys a temp directory as a test fixture.
PROJECT_ROOT#
class AllenNlpTestCase:
| ...
| PROJECT_ROOT = (pathlib.Path(__file__).parent / ".." / ".." / "..").resolve()
MODULE_ROOT#
class AllenNlpTestCase:
| ...
| MODULE_ROOT = PROJECT_ROOT / "allennlp"
TOOLS_ROOT#
class AllenNlpTestCase:
| ...
| TOOLS_ROOT = MODULE_ROOT / "tools"
TESTS_ROOT#
class AllenNlpTestCase:
| ...
| TESTS_ROOT = PROJECT_ROOT / "tests"
FIXTURES_ROOT#
class AllenNlpTestCase:
| ...
| FIXTURES_ROOT = PROJECT_ROOT / "test_fixtures"
setup_method#
class AllenNlpTestCase:
| ...
| def setup_method(self)
teardown_method#
class AllenNlpTestCase:
| ...
| def teardown_method(self)