Browse Source

verify requirements was updated from Pipfile

keep-around/33e2d19fe5d11943ffc03a22d1d90141d6c8211c
Loïc Dachary 10 months ago
parent
commit
176eab513f
Signed by: dachary GPG Key ID: 992D23B392F9E4F2
  1. 13
      tests/test_requirements.py

13
tests/test_requirements.py

@ -0,0 +1,13 @@
import filecmp
import os
def test_requirements(tmpdir):
requirements = f'{tmpdir}/r.txt'
requirements_dev = f'{tmpdir}/r-dev.txt'
os.system('pipenv run pipenv_to_requirements -f '
f'-o {requirements} -d {requirements_dev}')
r = filecmp.cmp('requirements.txt', requirements, shallow=False)
r_dev = filecmp.cmp('requirements-dev.txt', requirements_dev, shallow=False)
assert r and r_dev, ('requirements.txt needs updating from Pipfile, run'
' pipenv run pipenv_to_requirements -f')
Loading…
Cancel
Save