Skip to main content

Check if requirement files are frozen

Project description

pytest freeze reqs

Pytest plugin that tests if requirements are frozen.
**/req*.txt and **/req*.pip are the patterns of path to match.

ok and not ok lines in requirements.txt

Django<2.2  # ok
Django>=1.0  # not ok
requests  # not ok
requests>1.0,<2.3  # ok
-e git://github.com/org/pkg.git#egg=pkg  # not ok
-e git://github.com/org/pkg.git@{revision}#egg=elasticutils  # ok
-e /local/file  # ok

example error

================================== FAILURES ===================================
_________________ requirement: Django is not frozen properly. _________________
requirement freeze test failed
   improperly frozen requirement: 'Django': [('>', '1.0')]
   try adding pkg==version, or git@revision
________________ requirement: requests is not frozen properly. ________________
requirement freeze test failed
   improperly frozen requirement: 'requests': []
   try adding pkg==version, or git@revision
______________ requirement: elasticutils is not frozen properly. ______________
requirement freeze test failed
   improperly frozen requirement: 'elasticutils': '[no revision]'
   try adding pkg==version, or git@revision

usage

# just add --freeze_reqs arg to pytest
pytest --freeze_reqs

# if you want to run only freeze_reqs tests
pytest -m freeze_reqs --freeze_reqs

pytest.ini configuration

# here you can configure paths/files to ignore
# these are checked with contain.
freeze-reqs-ignore-paths=requirement_local.txt
                         requirements/req_dev.txt

# here you can configure paths/files to include
# these are checked with contain.
freeze-reqs-include-paths=requirements/base.txt
                          requirements/development.txt

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

pytest-freeze-reqs-0.1.8.tar.gz (3.1 kB view details)

Uploaded Source

File details

Details for the file pytest-freeze-reqs-0.1.8.tar.gz.

File metadata

  • Download URL: pytest-freeze-reqs-0.1.8.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.6.9

File hashes

Hashes for pytest-freeze-reqs-0.1.8.tar.gz
Algorithm Hash digest
SHA256 38b435cb9390785d0d08705bb9500890af1550bdf82dd154322f55c4c27332df
MD5 e011787c020cecc139402e6e142f9396
BLAKE2b-256 0b409c550c11f5f4fd898ab0bc65b7a959560dce0a215d7d63615e781aba7e9d

See more details on using hashes here.

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