whl2conda test¶
Usage¶
Test a conda package file in a fresh conda environment.
Installs the package into a new environment (along with any test requirements) and runs the tests specified by, in order of precedence: the --test-file option, the [tool.whl2conda.tests] section of a pyproject.toml, or the test section of a conda recipe (meta.yaml or recipe.yaml) found in the project directory.
positional arguments¶
<package-file>
Conda package file (.conda or .tar.bz2) to test
<project-dir>
Directory containing the test specification: either a
pyproject.toml with a [tool.whl2conda.tests] section or a
conda recipe. Defaults to the current directory.
options¶
test options¶
--test-file <yaml-file>
Read tests from given YAML file containing a v1 recipe
`tests` list (either a bare list or a mapping with a
`tests` key), overriding any project test specification.
-c <channel>, --channel <channel>
Additional channel for the test environment. May be repeated.
--python <version>
Python version to test against, e.g. '3.11'. May be
repeated to test against multiple versions. Overrides
any tool.whl2conda.test-python setting. If not specified,
the solver chooses the version.
-p <env-path>, --prefix <env-path>
Path of test environment to create, instead of a
location in a temporary work directory. Only allowed
with a single python version. The environment is still
removed after testing unless --keep-test-env is given.
--keep-test-env
Do not delete the test environment (for debugging).
--mamba Use mamba instead of conda to create and run test environments.