In my tests, I would like to run a command to make sure that the installed packages in my virtual environment match the packages found in Pipfile.lock.
Is there a command like this?
pipenv checkifinstalled || exit 1
In my tests, I would like to run a command to make sure that the installed packages in my virtual environment match the packages found in Pipfile.lock.
Is there a command like this?
pipenv checkifinstalled || exit 1
Copyright © 2021 Jogjafile Inc.
This problem can be reduced down to these two steps:
Convert
Pipfile.lockinto arequirements.txtfile (in the format generated bypip freeze).pipenv requirements(orpipenv requirements --dev). (Note that this command is supported in pipenv >= 2022.4.8)Check that the installed packages match the generated
requirements.txtfile.Implementation:
Here is how I put it all together in a test: