When running pytest --doctest-modules on a package that contains a pytest plugin, pytest errors out and produces a pretty long stacktrace. The code that triggers the error is the _get_plugin_specs_as_list function that receives a module object instead of a list or a string.
The behavior is OS-independent as far as I can tell, but affects only pytest 3.7+ ; pytest 3.6.4 works fine. Also note that the error is only triggered when doc-testing the specific subpackage that contains the plugin.
For proper context, we have the following directory structure:
odl
|
|- util --
| |- pytest_plugins.py
| |- ...
| - ...
The error is triggered by pytest --doctest-modules odl/util.
The full backtrace is here.
Link to the subpackage: https://github.com/odlgroup/odl/tree/master/odl/util
Edit: Updated pytest versions affected
When running
pytest --doctest-moduleson a package that contains a pytest plugin,pytesterrors out and produces a pretty long stacktrace. The code that triggers the error is the_get_plugin_specs_as_listfunction that receives a module object instead of a list or a string.The behavior is OS-independent as far as I can tell, but affects only pytest 3.7+ ; pytest 3.6.4 works fine. Also note that the error is only triggered when doc-testing the specific subpackage that contains the plugin.
For proper context, we have the following directory structure:
The error is triggered by
pytest --doctest-modules odl/util.The full backtrace is here.
Link to the subpackage: https://github.com/odlgroup/odl/tree/master/odl/util
Edit: Updated pytest versions affected