Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
django-rest-framework
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
django-rest-framework
Commits
33580c82
Commit
33580c82
authored
Dec 30, 2012
by
Tom Christie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanup runtests/runcoverage
parent
af5c3c3b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
5 deletions
+12
-5
rest_framework/runtests/runcoverage.py
+9
-0
rest_framework/runtests/runtests.py
+3
-5
No files found.
rest_framework/runtests/runcoverage.py
View file @
33580c82
...
...
@@ -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
)
...
...
rest_framework/runtests/runtests.py
View file @
33580c82
...
...
@@ -5,11 +5,9 @@
# http://code.djangoproject.com/svn/django/trunk/tests/runtests.py
import
os
import
sys
"""
Need to fix sys path so following works without specifically messing with PYTHONPATH
python ./rest_framework/runtests/runtests.py
"""
sys
.
path
.
append
(
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
"../.."
))
# 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
django.conf
import
settings
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment