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
example error
================================== FAILURES ===================================
_________________ requirement: Django is not frozen properly. _________________
requirement freeze test failed
improperly frozen requirement: 'Django': [('>=', '1.0')]
try e.g. Django==1.0
________________ requirement: requests is not frozen properly. ________________
requirement freeze test failed
improperly frozen requirement: 'requests': []
try e.g. requests==1.0
========================= 2 failed, 8 passed in 0.35s =========================
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
Built Distribution
File details
Details for the file pytest-freeze-reqs-0.1.7.tar.gz
.
File metadata
- Download URL: pytest-freeze-reqs-0.1.7.tar.gz
- Upload date:
- Size: 3.0 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
Algorithm | Hash digest | |
---|---|---|
SHA256 | fa92af209688fa1226bbdf6f2faaa3a32bfc43740e6af22b4f1bdeb2b554d7d3 |
|
MD5 | 7f6760f44bdb104b2bbed23fee77cbb4 |
|
BLAKE2b-256 | d809ac69ed31497928a4725302dc596b9100300e8d4a2602319a236ed041d18f |
File details
Details for the file pytest_freeze_reqs-0.1.7-py3.6.egg
.
File metadata
- Download URL: pytest_freeze_reqs-0.1.7-py3.6.egg
- Upload date:
- Size: 5.5 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
Algorithm | Hash digest | |
---|---|---|
SHA256 | b3dcb0afc28c644d4031a2e9b2aa258844e383c08474829b9ded58e1430bfe8a |
|
MD5 | deddbc9bc3b29895baa1dcd4c7fbb2c0 |
|
BLAKE2b-256 | 0d5eadba204034974d91a04530852c8b463b7c074a8836d022902667eeff43da |