Skip to content

Testing without optional dependencies #1905

@mwtoews

Description

@mwtoews

Bugs may occur when optional packages are either installed or not installed. These issues may evade the current CI, which assumes all optional dependencies are installed. I'm wondering if it is worthwhile to run a few tests in serial. For example, here is a sequence a worker would do:

# basic install without any optional dependencies
pip install .[test]
pytest -S --cov
# re-install with all optional dependencies
pip install .[optional]
pytest -S --cov --cov-append
# remove a few optional dependencies
pip uninstall --yes pyproj shapely [possibly a few others]
pytest -S --cov --cov-append

note that the coverage reports are appended, which could potentially increase the coverage to cover logic that assumes optional decencies are installed or not.

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions