djangosnippets.org: Latest snippets tagged with 'runner'https://djangosnippets.org/tags/runner/2010-06-04T08:43:16.169000-05:00Class-based coverage test runner
2010-06-04T08:43:16.169000-05:00brutassehttps://djangosnippets.org/snippets/2052/<p>A coverage test runner that uses the class-based runner introduced with Django 1.2.</p>
<p>Put it in your python path and add to your <code>settings.py</code>:</p>
<pre><code>TEST_RUNNER = 'path_to.CoverageRunner'
COVERAGE_MODULES = [
'blog.views',
'projects.views',
'middleware',
]
</code></pre>
<p>Compatible with Django 1.2 and higher. You also need Ned Batchelder's <code>coverage.py</code> module (<code>pip …</code></p>
Freely redistributableTest runner with coverage
2008-04-15T02:00:27.466160-05:00nicklanehttps://djangosnippets.org/snippets/705/<p>A replacement test runner which outputs a coverage report after the tests. Simply change your <code>TEST_RUNNER</code> setting to point to <code>run_tests_with_coverage</code> and you're good to go.
</p>
<p>Note that 'as-is' this snippet reports the coverage of all modules underneath the app, by walking the directory tree and loading all of the …</p>
Freely redistributable