~vcs-imports/pyunit/main

« back to all changes in this revision

Viewing changes to unittest.py

  • Committer: purcell
  • Date: 2001-12-08 06:47:37 UTC
  • Revision ID: Arch-1:pyunit@products.ubuntu.com%pyunit--MAIN--0--patch-80
Patch 487662 applied: error message for assertEqual uses 'repr' not 'str'

Show diffs side-by-side

added added

removed removed

Lines of Context:
46
46
 
47
47
__author__ = "Steve Purcell"
48
48
__email__ = "stephen_purcell at yahoo dot com"
49
 
__version__ = "$Revision: 1.41 $"[11:-2]
 
49
__version__ = "$Revision: 1.42 $"[11:-2]
50
50
 
51
51
import time
52
52
import sys
277
277
           operator.
278
278
        """
279
279
        if first != second:
280
 
            raise self.failureException, (msg or '%s != %s' % (first, second))
 
280
            raise self.failureException, \
 
281
                  (msg or '%s != %s' % (`first`, `second`))
281
282
 
282
283
    def failIfEqual(self, first, second, msg=None):
283
284
        """Fail if the two objects are equal as determined by the '=='
284
285
           operator.
285
286
        """
286
287
        if first == second:
287
 
            raise self.failureException, (msg or '%s == %s' % (first, second))
 
288
            raise self.failureException, \
 
289
                  (msg or '%s == %s' % (`first`, `second`))
288
290
 
289
291
    assertEqual = assertEquals = failUnlessEqual
290
292