Skip to content

Commit be51bc2

Browse files
committed
Change the lines saying that a test has failed to make it easier to cut-paste to run the failed test again. Commit ready for merge.
- Legacy-Id: 12378
1 parent a3cc9df commit be51bc2

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

ietf/utils/test_runner.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@
6363
import ietf
6464
import ietf.utils.mail
6565
from ietf.utils.test_smtpserver import SMTPTestServerDriver
66+
from ietf.utils.test_utils import TestCase
6667

6768
loaded_templates = set()
6869
visited_urls = set()
@@ -226,7 +227,7 @@ def report(self):
226227
return result
227228

228229

229-
class CoverageTest(unittest.TestCase):
230+
class CoverageTest(TestCase):
230231

231232
def __init__(self, test_runner=None, **kwargs):
232233
self.runner = test_runner

ietf/utils/test_utils.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
from datetime import datetime
4040
import urllib2 as urllib
4141
from difflib import unified_diff
42+
from unittest.util import strclass
4243

4344
import django.test
4445
from django.db import connection
@@ -295,3 +296,5 @@ def assertValidHTMLResponse(self, resp):
295296
self.assertTrue(resp['Content-Type'].startswith('text/html'))
296297
self.assertValidHTML(resp.content)
297298

299+
def __str__(self):
300+
return "%s (%s.%s)" % (self._testMethodName, strclass(self.__class__),self._testMethodName)

0 commit comments

Comments
 (0)