~jameinel/subunit/only-genuine-failures

« back to all changes in this revision

Viewing changes to python/subunit/__init__.py

  • Committer: Robert Collins
  • Date: 2010-06-24 10:02:35 UTC
  • Revision ID: robertc@robertcollins.net-20100624100235-7ilwjarot10k76vi
Fix make check with testtools trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
244
244
 
245
245
    def lostConnection(self):
246
246
        """Connection lost."""
247
 
        self.parser._lostConnectionInTest('unknown state of ')
 
247
        self.parser._lostConnectionInTest(u'unknown state of ')
248
248
 
249
249
    def startTest(self, offset, line):
250
250
        """A test start command received."""
324
324
 
325
325
    def lostConnection(self):
326
326
        """Connection lost."""
327
 
        self.parser._lostConnectionInTest('')
 
327
        self.parser._lostConnectionInTest(u'')
328
328
 
329
329
 
330
330
class _OutSideTest(_ParserState):
359
359
 
360
360
    def lostConnection(self):
361
361
        """Connection lost."""
362
 
        self.parser._lostConnectionInTest('%s report of ' %
 
362
        self.parser._lostConnectionInTest(u'%s report of ' %
363
363
            self._outcome_label())
364
364
 
365
365
    def _outcome_label(self):
501
501
        self._state.lineReceived(line)
502
502
 
503
503
    def _lostConnectionInTest(self, state_string):
504
 
        error_string = "lost connection during %stest '%s'" % (
 
504
        error_string = u"lost connection during %stest '%s'" % (
505
505
            state_string, self.current_test_description)
506
506
        self.client.addError(self._current_test, RemoteError(error_string))
507
507
        self.client.stopTest(self._current_test)
707
707
        """Obey the testtools result.done() interface."""
708
708
 
709
709
 
710
 
def RemoteError(description=""):
 
710
def RemoteError(description=u""):
711
711
    return (_StringException, _StringException(description), None)
712
712
 
713
713
 
757
757
    def run(self, result=None):
758
758
        if result is None: result = self.defaultTestResult()
759
759
        result.startTest(self)
760
 
        result.addError(self, RemoteError("Cannot run RemotedTestCases.\n"))
 
760
        result.addError(self, RemoteError(u"Cannot run RemotedTestCases.\n"))
761
761
        result.stopTest(self)
762
762
 
763
763
    def _strclass(self):