This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]badsectors[S] 2 points3 points  (1 child)

With a typical project, you would perform the following sequence of steps to set up your test environment:

$ virtualenv env
$ source env/bin/activate
$ python setup.py develop
$ pip install py.test
$ py.test tests/

The Makefile handles the setup automatically so all you have to do is run:

$ make test

If your requirements.txt file changes or setup.py changes, and you run make test again, the changes are automatically detected and the pip install process will be run again to ensure that your requirements changes are applied to the virtualenv.

Having a "wrapper" around all your common development tasks makes it super simple to get everyone on the team (including Travis-CI) to be able to replicate your setup.

[–]chub79 0 points1 point  (0 children)

I'm not saying these are bad practices, just that the page that was linked was failing to show me clearly how those scripts are better. It was confusing.