Skip to main content

A plugin for tox that utilizes PDM as the package manager and installer

Project description

tox-pdm

A plugin for tox that utilizes PDM as the package manager and installer.

Github Actions PyPI

With this plugin, you can migrate your project to PDM while retaining the ability to test against multiple versions.

Installation

$ pip install tox-pdm

Or,

$ pdm add -d tox-pdm

Example tox.ini

The following simple example installs dev and test dependencies into the venv created by Tox and uses pytest to execute the tests, on both Python 3.7 and 3.8.

[tox]
envlist = py37,py38

[testenv]
sections =  ; Dependency sections in pyproject.toml
    dev
    test
deps =      ; Additional dependencies, it will be installed into the library path via normal pip method
    flake8
commands =
    pytest test/

A real-world example can be found at this repository's tox.ini and GitHub Action workflow.

Some best practices:

  1. Make sure you have generated pdm.lock before running the test, it will greatly accelerate the testing.
  2. If you don't set skip_install = true, the current package will be built and installed into the testing environment together with the dependencies from pyproject.toml.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tox-pdm-0.1.0.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

tox_pdm-0.1.0-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file tox-pdm-0.1.0.tar.gz.

File metadata

  • Download URL: tox-pdm-0.1.0.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.8.6

File hashes

Hashes for tox-pdm-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b0c4087042ceff307463705186945c3cd8577ddfd2a28c0bea3bc5091beaaacb
MD5 14ed45ce17cb9a18d9c2cc52879995a9
BLAKE2b-256 0a181d0903031483bfa6bceacfb176d9788220a84c8d1ac204c7ccf51cff11f0

See more details on using hashes here.

Provenance

File details

Details for the file tox_pdm-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: tox_pdm-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.8.6

File hashes

Hashes for tox_pdm-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8c91c2a02911f8d6af28a76871b5f4652bfde5a29bb468adeaa69e1208627b5b
MD5 2627b28dac0d269e4690dce54a223d4b
BLAKE2b-256 0467804398e3f31905e932761702c94844727eecf88c9825e83ff94ef7dbea5d

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page