Ticket #16372: test-result-bugfix.diff

File test-result-bugfix.diff, 844 bytes (added by Piotr Czachur, 13 years ago)
  • tmp/django/test/testcases.py

    === tmp/django/test/testcases.py
    ==================================================================
     
    285285        testMethod = getattr(self, self._testMethodName)
    286286        if (getattr(self.__class__, "__unittest_skip__", False) or
    287287            getattr(testMethod, "__unittest_skip__", False)):
     288            # If the class or method was skipped.
     289            result.startTest(self)
     290            try:
     291                skip_why = (getattr(self.__class__, '__unittest_skip_why__', '')
     292                            or getattr(testMethod, '__unittest_skip_why__', ''))
     293                self._addSkip(result, skip_why)
     294            finally:
     295                result.stopTest(self)
    288296            return
    289297
    290298        self.client = self.client_class()
Back to Top