diff options
author | Walter Dörwald <walter@livinglogic.de> | 2004-02-12 17:35:32 (GMT) |
---|---|---|
committer | Walter Dörwald <walter@livinglogic.de> | 2004-02-12 17:35:32 (GMT) |
commit | 70a6b49821a3226f55e9716f32d802d06640cb89 (patch) | |
tree | 3c8ca10c1fa09e025bd266cf855a00d7d96c55aa /Lib/unittest.py | |
parent | ecfeb7f095dfd9c1c8929bf3df858ee35e0d9e9e (diff) | |
download | cpython-70a6b49821a3226f55e9716f32d802d06640cb89.zip cpython-70a6b49821a3226f55e9716f32d802d06640cb89.tar.gz cpython-70a6b49821a3226f55e9716f32d802d06640cb89.tar.bz2 |
Replace backticks with repr() or "%r"
From SF patch #852334.
Diffstat (limited to 'Lib/unittest.py')
-rw-r--r-- | Lib/unittest.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/unittest.py b/Lib/unittest.py index 0ec059c..29d90e3 100644 --- a/Lib/unittest.py +++ b/Lib/unittest.py @@ -330,7 +330,7 @@ class TestCase: """ if not first == second: raise self.failureException, \ - (msg or '%s != %s' % (`first`, `second`)) + (msg or '%r != %r' % (first, second)) def failIfEqual(self, first, second, msg=None): """Fail if the two objects are equal as determined by the '==' @@ -338,7 +338,7 @@ class TestCase: """ if first == second: raise self.failureException, \ - (msg or '%s == %s' % (`first`, `second`)) + (msg or '%r == %r' % (first, second)) def failUnlessAlmostEqual(self, first, second, places=7, msg=None): """Fail if the two objects are unequal as determined by their @@ -350,7 +350,7 @@ class TestCase: """ if round(second-first, places) != 0: raise self.failureException, \ - (msg or '%s != %s within %s places' % (`first`, `second`, `places` )) + (msg or '%r != %r within %r places' % (first, second, places)) def failIfAlmostEqual(self, first, second, places=7, msg=None): """Fail if the two objects are equal as determined by their @@ -362,7 +362,7 @@ class TestCase: """ if round(second-first, places) == 0: raise self.failureException, \ - (msg or '%s == %s within %s places' % (`first`, `second`, `places`)) + (msg or '%r == %r within %r places' % (first, second, places)) # Synonyms for assertion methods |