aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework/runtests/runcoverage.py
diff options
context:
space:
mode:
authorAndrew Hankinson2012-12-30 14:03:08 -0400
committerAndrew Hankinson2012-12-30 14:03:08 -0400
commitc6f212238c238561749574a54aec3b1b1fd8df61 (patch)
tree6c235aa1f61cdbcd834bccaa2c31c4c1bb32de0e /rest_framework/runtests/runcoverage.py
parentdf1880185c87733a82a41392898e67fe02c769aa (diff)
parent33580c82b3487bdf00cbbaef409a4dd41e6750d5 (diff)
downloaddjango-rest-framework-c6f212238c238561749574a54aec3b1b1fd8df61.tar.bz2
Merge branch 'master' of git://github.com/tomchristie/django-rest-framework into patch-support
Diffstat (limited to 'rest_framework/runtests/runcoverage.py')
-rwxr-xr-xrest_framework/runtests/runcoverage.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/rest_framework/runtests/runcoverage.py b/rest_framework/runtests/runcoverage.py
index 0ce379eb..bcab1d14 100755
--- a/rest_framework/runtests/runcoverage.py
+++ b/rest_framework/runtests/runcoverage.py
@@ -8,6 +8,9 @@ Useful tool to run the test suite for rest_framework and generate a coverage rep
# http://code.djangoproject.com/svn/django/trunk/tests/runtests.py
import os
import sys
+
+# fix sys path so we don't need to setup PYTHONPATH
+sys.path.append(os.path.join(os.path.dirname(__file__), "../.."))
os.environ['DJANGO_SETTINGS_MODULE'] = 'rest_framework.runtests.settings'
from coverage import coverage
@@ -55,6 +58,12 @@ def main():
if 'compat.py' in files:
files.remove('compat.py')
+ # Same applies to template tags module.
+ # This module has to include branching on Django versions,
+ # so it's never possible for it to have full coverage.
+ if 'rest_framework.py' in files:
+ files.remove('rest_framework.py')
+
cov_files.extend([os.path.join(path, file) for file in files if file.endswith('.py')])
cov.report(cov_files)