From 30d881e215e4fbf50019baa99faf3ca2d78052b2 Mon Sep 17 00:00:00 2001 From: Marko Tibold Date: Wed, 4 Jan 2012 13:55:37 +0100 Subject: Don't raise when in compat mode, just pass. --- djangorestframework/compat.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'djangorestframework/compat.py') 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 -- cgit v1.2.3