September 2017
Intermediate to advanced
222 pages
5h 1m
English
Did you know that one of the definitions of “recurse” is to swear at your code twice? Well, no. But, it does mean to traverse subdirectories. In the case of pytest, test discovery traverses many directories recursively. But there are some directories you just know you don’t want pytest looking in.
The default setting for norecurse is ’.* build dist CVS _darcs {arch} and *.egg. Having ’.*’ is a good reason to name your virtual environment ’.venv’, because all directories starting with a dot will not be traversed. However, I have a habit of naming it venv, so I could add that to norecursedirs.
In the case of the Tasks project, you could list src in there also, because having pytest look for test ...
Read now
Unlock full access