Testing Guidelines

Prerequisite Reading & Misc. Background Information

Familiarity with the concepts covered in the following sections are highly recommended:

Testing Utilities

We use pytest and pytest-cov.

Tests are stored in metagraph/tests/.

Core Plugin Testing

Be sure to read our guidelines on plugin testing and the Plugin Author Guide.

We store tests for the 3 plugin parts described in the Plugin Author Guide in 3 subdirectories of metagraph/tests/.

Tests for core plugin algorithms are stored in metagraph/tests/algorithms/.

Tests for core plugin translators are stored in metagraph/tests/translators/.

Tests for core plugin types are stored in metagraph/tests/types/.

Core Metagraph Testing

Tests for Metagraph’s core functionality, e.g. resolver, plugin registry, etc. are stored directly in metagraph/tests/.

When making core Metagraph changes, ensure via pytest-cov that test coverage is as close to 100% as possible.