Skip to content

Commit 2150082

Browse files
committed
Added some debugging code to help identify random test failures
- Legacy-Id: 14226
1 parent 4f83548 commit 2150082

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

ietf/submit/tests.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import os
88
import re
99
import shutil
10+
import sys
1011

1112

1213
from StringIO import StringIO
@@ -141,6 +142,8 @@ def do_submission(self, name, rev, group=None, formats=["txt",], author=None):
141142
self.assertTrue(os.path.exists(os.path.join(self.staging_dir, u"%s-%s.%s" % (name, rev, format))))
142143
self.assertEqual(Submission.objects.filter(name=name).count(), 1)
143144
submission = Submission.objects.get(name=name)
145+
if len(submission.authors) != 1:
146+
sys.stderr.write((u"Author name used in test: %s\n"%author).encode('utf8'))
144147
self.assertEqual(len(submission.authors), 1)
145148
a = submission.authors[0]
146149
self.assertEqual(a["name"], author.ascii)

0 commit comments

Comments
 (0)