Clarify which tests to run in the Makefile
authorKevin Burke <kev@inburke.com>
Sat, 23 Aug 2014 17:02:27 +0000 (10:02 -0700)
committerKevin Burke <kev@inburke.com>
Sat, 23 Aug 2014 17:02:27 +0000 (10:02 -0700)
If you put your Virtualenv in the same folder as Requests (as I
usually do), py.test will pick up any test_* files inside the
virtualenv and attempt to run them too, leading to the following error:
https://gist.github.com/kevinburke/1aa2b07e01de3a7daa15

Instead specify the test file we would like to run in the Makefile.

Makefile

index 3c838c935b05464f9f1d86f4fa279d09c14d2793..7c85872977cc3511a81f0a05dbe3bd263ff9cb7f 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -4,7 +4,9 @@ init:
        pip install -r requirements.txt
 
 test:
-       py.test
+       # This runs all of the tests. To run an individual test, run py.test with
+       # the -k flag, like "py.test -k "
+       py.test test_requests.py
 
 coverage:
        py.test --verbose --cov-report term --cov=requests test_requests.py