Created
November 29, 2012 14:26
-
-
Save ghl3/4169432 to your computer and use it in GitHub Desktop.
Makefile for python unittest
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RUNTEST=python -m unittest -v -b | |
ALLMODULES=$(patsubst %.py, %, $(wildcard test_*.py)) | |
all: | |
${RUNTEST} ${ALLMODULES} | |
% : test_%.py | |
${RUNTEST} test_$@ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks for posting. Small correction:
ALLMODULES=$(patsubst %.py, %.py, $(wildcard test_*.py))
(otherwise your list of test Python test files have no extension and the no test is executed)