aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarko Tibold2012-01-04 13:55:37 +0100
committerMarko Tibold2012-01-04 13:55:37 +0100
commit30d881e215e4fbf50019baa99faf3ca2d78052b2 (patch)
treef84aa4b02688af736054d8cd54ede6fb485b6af5
parent1f6e3429e42155df09ad684a029efe1242ead445 (diff)
downloaddjango-rest-framework-30d881e215e4fbf50019baa99faf3ca2d78052b2.tar.bz2
Don't raise when in compat mode, just pass.
-rw-r--r--djangorestframework/compat.py6
-rw-r--r--djangorestframework/runtests/runcoverage.py1
2 files changed, 1 insertions, 6 deletions
diff --git a/djangorestframework/compat.py b/djangorestframework/compat.py
index 1d86338d..7690316c 100644
--- a/djangorestframework/compat.py
+++ b/djangorestframework/compat.py
@@ -439,10 +439,6 @@ except ImportError: # python < 2.7
from unittest import TestCase
import functools
- class SkipTest(Exception):
- # Pasted from py27/lib/unittest/case.py
- pass
-
def skip(reason):
# Pasted from py27/lib/unittest/case.py
"""
@@ -452,7 +448,7 @@ except ImportError: # python < 2.7
if not (isinstance(test_item, type) and issubclass(test_item, TestCase)):
@functools.wraps(test_item)
def skip_wrapper(*args, **kwargs):
- raise SkipTest(reason)
+ pass
test_item = skip_wrapper
test_item.__unittest_skip__ = True
diff --git a/djangorestframework/runtests/runcoverage.py b/djangorestframework/runtests/runcoverage.py
index ab1b0498..0ab61479 100644
--- a/djangorestframework/runtests/runcoverage.py
+++ b/djangorestframework/runtests/runcoverage.py
@@ -35,7 +35,6 @@ def main():
else:
test_runner = TestRunner()
failures = test_runner.run_tests(['djangorestframework'])
-
cov.stop()
# Discover the list of all modules that we should test coverage for