Tox Pipenv

Tox plugin that uses Pipenv for Python test environment management across multiple Python versions

What it is

Tox-pipenv is a plugin for the tox testing tool that replaces the default virtualenv and pip workflow with Pipenv's modern Python packaging approach. It allows developers to maintain their Pipenv-based development workflow while testing code across multiple Python versions and interpreters through tox's established automation framework.

The plugin integrates seamlessly with existing tox configurations by using pipenv with the specified Python binary for each test environment. Virtual environments are created in the .tox directory with corresponding Pipfile and Pipfile.lock files, ensuring deterministic builds. Requirements from tox configuration files and requirements.txt files are parsed and installed via pipenv, replacing traditional pip usage.

Python developers and teams who use Pipenv for dependency management benefit from this plugin because it eliminates the need to maintain separate dependency configurations for development and testing. Continuous integration pipelines that already use tox can adopt Pipenv's workflow without restructuring their test infrastructure.

Installation is straightforward through pip or pipenv, and the plugin activates automatically when tox runs. The --recreate flag forces recreation of cached environments with pipenv. Site package configuration from tox is respected and passed to pipenv appropriately.

As an open source project hosted on Read the Docs, tox-pipenv fills a specific niche in the Python ecosystem by bridging two popular tools. It enables consistent dependency resolution across development and test environments while leveraging tox's multi-version testing capabilities.

This description was generated by AI from the site's public content and may contain errors.

What you can do there

  • Replace tox virtualenv with Pipenv workflow
  • Test across multiple Python versions using Pipenv
  • Install dependencies from tox config and requirements.txt via Pipenv
  • Generate deterministic builds with Pipfile.lock
  • Integrate with existing tox configurations and CI pipelines

Who it's for

Python developers and teams using Pipenv for dependency management who need multi-version testing

Frequently asked questions about tox-pipenv.readthedocs.io

›What does tox-pipenv do?

It replaces tox's default virtualenv and pip usage with Pipenv for creating test environments and installing dependencies.

›How do I install tox-pipenv?

Install it using pip install tox-pipenv or pipenv install tox-pipenv, then run tox as normal.

›Does tox-pipenv work with existing tox configurations?

Yes, it integrates with existing tox.ini files and uses the Python interpreters specified in your tox environments.

›Where are the virtual environments created?

Environments are created in .tox/{env}/ with Pipfile and Pipfile.lock files for each test environment.

›Can I use requirements.txt files with tox-pipenv?

Yes, requirements.txt files are parsed by Pipenv and used for each test environment automatically.

›How does tox-pipenv handle site packages?

If site-packages is configured in your tox config, the --site-packages flag is passed to pipenv during environment creation.

›Is tox-pipenv compatible with continuous integration systems?

Yes, it works with any CI system that supports tox since it operates as a standard tox plugin.