From the course: Python Data Analytics: From Notebooks to Production

Unlock this course with a free trial

Join today to access over 25,500 courses taught by industry experts.

Separating test dependencies

Separating test dependencies

- [Instructor] In most projects, you're going to have two sets of requirements, one which is required for production, and another one which is only required for development, say the linters or maybe pytest and other things. And you want to separate these so when you install your code into production, they use only the requirements for production and not more. So, let's say I have a test here. I add a test to my code, and I'm using pytest. So pytest is now a requirement for my code, but it is a development requirement. Pytest is not required in production, and actually running test in production is a guaranteed way to do some damage. So, try not to do that. So, I have the requirements, which is the production requirements, and I also have now a dev-requirements, which is development requirements. And here, the first thing I do is -r. I'm importing also or including the production requirements in the development requirements. Development requirements are always a superset of the…

Contents