diff options
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | README | 4 | ||||
-rw-r--r-- | runtests.py | 20 |
3 files changed, 12 insertions, 14 deletions
@@ -14,7 +14,7 @@ vtest: testloop: while sleep 1; do $(PYTHON) runtests.py -v $(VERBOSE) $(FLAGS); done -# See README for coverage installation instructions. +# See runtests.py for coverage installation instructions. cov coverage: $(PYTHON) runtests.py --coverage tulip -v $(VERBOSE) $(FLAGS) echo "open file://`pwd`/htmlcov/index.html" @@ -8,8 +8,8 @@ Copyright/license: Open source, Apache 2.0. Enjoy. Master Mercurial repo: http://code.google.com/p/tulip/ -The old code lives in the subdirectory 'old'; the new code (conforming -to PEP 3156, under construction) lives in the 'tulip' subdirectory. +The actual code lives in the 'tulip' subdirectory. +Tests are in the 'tests' subdirectory. To run tests: - make test diff --git a/runtests.py b/runtests.py index 1ec0b29..484bff0 100644 --- a/runtests.py +++ b/runtests.py @@ -1,18 +1,15 @@ -"""Run all unittests. +"""Run Tulip unittests. Usage: - python3 runtests.py [-v] [-q] [pattern] ... + python3 runtests.py [flags] [pattern] ... -Where: - -v: verbose - -q: quiet - pattern: optional regex patterns to match test ids (default all tests) - -Note that the test id is the fully qualified name of the test, +Patterns are matched against the fully qualified name of the test, including package, module, class and method, e.g. 'tests.events_test.PolicyTests.testPolicy'. -runtests.py with --coverage argument is equivalent of: +For full help, try --help. + +runtests.py --coverage is equivalent of: $(COVERAGE) run --branch runtests.py -v $(COVERAGE) html $(list of files) @@ -152,8 +149,9 @@ class TestResult(unittest.TextTestResult): gc.collect() if gc.garbage: if self.showAll: - self.stream.writeln(" Warning: test created {} uncollectable " - "object(s).".format(len(gc.garbage))) + self.stream.writeln( + " Warning: test created {} uncollectable " + "object(s).".format(len(gc.garbage))) # move the uncollectable objects somewhere so we don't see # them again self.leaks.append((self.getDescription(test), gc.garbage[:])) |