Skip to main content

Testing

Dispatch provides a basic test-based testing framework for plugins. In a simple plugin, you'll need to do a few things to get it working:

Require Dispatch

If your plugin is packaged separately from Dispatch, make sure its pyproject.toml (or setup.py) declares a dependency on dispatch.

Running Tests

Running tests follows the py.test standard. As long as your test files and methods are named appropriately (test_filename.py and test_function()) you can call out to py.test:

> pytest tests/plugins/test_dispatch_pluginname.py