From e26f94891b9f12827df7fa32e8f829ff29d95c70 Mon Sep 17 00:00:00 2001 From: Matt Conway Date: Wed, 26 Feb 2014 19:10:17 -0500 Subject: [PATCH] allow running individual test files, or single test cases in a file --- Makefile | 2 +- README.md | 15 ++++++++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 748c504..56b7bee 100644 --- a/Makefile +++ b/Makefile @@ -18,4 +18,4 @@ clean: .PHONY: test test: qless.lua *.lua - nosetests --exe -v + nosetests --exe -v $(TEST) diff --git a/README.md b/README.md index e836f6b..817df84 100644 --- a/README.md +++ b/README.md @@ -54,12 +54,25 @@ installed: pip install redis nose ``` -To run the tests, there is a directive included in the makefile: +To run all the tests, there is a directive included in the makefile: ```bash make test ``` +You can run specific test files by passing the TEST environment variable to make: + +```bash +make test TEST=test/test_worker.py +``` + +or for a single test case in that file: + +```bash +make test TEST=test/test_worker.py:TestWorker.test_basic +``` + + If you have Redis running somewhere other than `localhost:6379`, you can supply the `REDIS_URL` environment variable: