aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework/runtests/runcoverage.py
diff options
context:
space:
mode:
authorXavier Ordoquy2013-01-02 16:09:21 +0100
committerXavier Ordoquy2013-01-02 16:09:21 +0100
commit737349d2389197d23886b72c1cb44f53c501ac9a (patch)
tree0c542b6c73deee0280705c8253334126c5f5d254 /rest_framework/runtests/runcoverage.py
parent5fad46d7e213afed503b1533515cab96875a5936 (diff)
parentd379997aba5b1e41309bbed8740ed704c0feb58b (diff)
downloaddjango-rest-framework-737349d2389197d23886b72c1cb44f53c501ac9a.tar.bz2
Merge remote-tracking branch 'reference/py3k' into p3k
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)