pytest-conda-solvers
A pytest plugin that runs shared conda solver YAML tests against classic, libmamba, or other conda solver backends.
The PyPI package ships the plugin, fixtures, mock channel data, and shared YAML
suite under pytest_conda_solvers/. When the plugin loads, it automatically adds
the bundled suite to pytest's collection.
conda-solver-tests pytest plugin was orginally generated with [Cookiecutter] along with [@hackebrot]'s [cookiecutter-pytest-plugin] template.
Error assertion semantics
For unsatisfiable tests, this suite deliberately asserts more than conda's own
test suite does when running under conda-libmamba-solver. Upstream's
assert_unsatisfiable helper only checks the exception is an
UnsatisfiableError subclass there, because its entries comparison is gated on
the exact UnsatisfiableError type. Our runner additionally checks that the
endpoint package names of each expected conflict chain appear in the libmamba
error message, and message_includes/message_excludes fields in the YAML add
further content checks. This strengthening is intentional: cross-solver
consistency of error reporting is part of what this plugin exists to verify.
Requirements
- Python ≥ 3.10
- A working conda (>=26.3.0) installation in the environment (install via conda, mamba, or pixi — not from PyPI)
- The solver backend under test (for example
conda-libmamba-solver)
Installation
conda create -n solver-test-env conda conda-libmamba-solver pip
conda activate solver-test-env
python -m pip install pytest-conda-solvers
For local development from a checkout:
pixi install
# or: pip install -e .
Usage
Select a solver with --conda-solver; the bundled suite is collected automatically:
pytest --conda-solver=libmamba
pytest --conda-solver=classic
Paths passed to pytest are collected alongside the bundled suite, so solver authors can add their own Python or YAML tests normally.
Use --no-bundled-solver-tests to collect custom tests without the suite
shipped by this package.
From this repository with pixi:
pixi run test-libmamba-solver
pixi run test-classic-solver
The plugin collects solver-suite .yaml files, starts a session-scoped mock channel server, and runs each case through the selected solver backend.
Contributing
Contributions are welcome. It is recommended to use pixi for the development environment and run the solver test tasks above before opening a pull request.
Build the documentation locally with pixi run -e docs docs-build.
License
Distributed under the BSD-3-Clause license.
Issues
If you encounter problems, please file an issue.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pytest_conda_solvers-0.1.0.tar.gz.
File metadata
- Download URL: pytest_conda_solvers-0.1.0.tar.gz
- Upload date:
- Size: 1.8 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
92b38e1ca5a8fa03183dea85712770c2602328756d7f73f1fc0d3edfa86830d9
|
|
| MD5 |
dcae245ccd9f31aae6649b278c99241f
|
|
| BLAKE2b-256 |
e741949228d0643cdc65c6dd16d947a0abf9467b15fa62888f9acd7c2ab8c093
|
Provenance
The following attestation bundles were made for pytest_conda_solvers-0.1.0.tar.gz:
Publisher:
release.yml on conda-incubator/pytest-conda-solvers
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pytest_conda_solvers-0.1.0.tar.gz -
Subject digest:
92b38e1ca5a8fa03183dea85712770c2602328756d7f73f1fc0d3edfa86830d9 - Sigstore transparency entry: 2684760679
- Sigstore integration time:
-
Permalink:
conda-incubator/pytest-conda-solvers@4c17f69c347eb67169318427b85e66a3a3adf9ca -
Branch / Tag:
refs/tags/0.1.0 - Owner: https://github.com/conda-incubator
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@4c17f69c347eb67169318427b85e66a3a3adf9ca -
Trigger Event:
push
-
Statement type:
File details
Details for the file pytest_conda_solvers-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pytest_conda_solvers-0.1.0-py3-none-any.whl
- Upload date:
- Size: 1.8 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
43c63e67e39a24717f2159dc88a30b18fb82bab3e44da460ab2a374a9ad01353
|
|
| MD5 |
ee2db101bb0afd9caa80f7c811fcac8b
|
|
| BLAKE2b-256 |
9ea2f3db1559e7bede4a1a91e9f52fa913f674324c71b5641a934505a1a58309
|
Provenance
The following attestation bundles were made for pytest_conda_solvers-0.1.0-py3-none-any.whl:
Publisher:
release.yml on conda-incubator/pytest-conda-solvers
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pytest_conda_solvers-0.1.0-py3-none-any.whl -
Subject digest:
43c63e67e39a24717f2159dc88a30b18fb82bab3e44da460ab2a374a9ad01353 - Sigstore transparency entry: 2684760859
- Sigstore integration time:
-
Permalink:
conda-incubator/pytest-conda-solvers@4c17f69c347eb67169318427b85e66a3a3adf9ca -
Branch / Tag:
refs/tags/0.1.0 - Owner: https://github.com/conda-incubator
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@4c17f69c347eb67169318427b85e66a3a3adf9ca -
Trigger Event:
push
-
Statement type: