diff options
Diffstat (limited to 'Lib/test/test_repr.py')
| -rw-r--r-- | Lib/test/test_repr.py | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/Lib/test/test_repr.py b/Lib/test/test_repr.py index a8202ee..8b20acd 100644 --- a/Lib/test/test_repr.py +++ b/Lib/test/test_repr.py @@ -22,7 +22,7 @@ def nestedTuple(nesting): class ReprTests(unittest.TestCase): def test_string(self): - eq = self.assertEquals + eq = self.assertEqual eq(r("abc"), "'abc'") eq(r("abcdefghijklmnop"),"'abcdefghijklmnop'") @@ -36,7 +36,7 @@ class ReprTests(unittest.TestCase): eq(r(s), expected) def test_tuple(self): - eq = self.assertEquals + eq = self.assertEqual eq(r((1,)), "(1,)") t3 = (1, 2, 3) @@ -51,7 +51,7 @@ class ReprTests(unittest.TestCase): from array import array from collections import deque - eq = self.assertEquals + eq = self.assertEqual # Tuples give up after 6 elements eq(r(()), "()") eq(r((1,)), "(1,)") @@ -101,7 +101,7 @@ class ReprTests(unittest.TestCase): "array('i', [1, 2, 3, 4, 5, ...])") def test_numbers(self): - eq = self.assertEquals + eq = self.assertEqual eq(r(123), repr(123)) eq(r(123L), repr(123L)) eq(r(1.0/3), repr(1.0/3)) @@ -111,7 +111,7 @@ class ReprTests(unittest.TestCase): eq(r(n), expected) def test_instance(self): - eq = self.assertEquals + eq = self.assertEqual i1 = ClassWithRepr("a") eq(r(i1), repr(i1)) @@ -141,7 +141,7 @@ class ReprTests(unittest.TestCase): # XXX anonymous functions? see func_repr def test_builtin_function(self): - eq = self.assertEquals + eq = self.assertEqual # Functions eq(repr(hash), '<built-in function hash>') # Methods @@ -149,13 +149,13 @@ class ReprTests(unittest.TestCase): '<built-in method split of str object at 0x')) def test_xrange(self): - eq = self.assertEquals + eq = self.assertEqual eq(repr(xrange(1)), 'xrange(1)') eq(repr(xrange(1, 2)), 'xrange(1, 2)') eq(repr(xrange(1, 2, 3)), 'xrange(1, 4, 3)') def test_nesting(self): - eq = self.assertEquals + eq = self.assertEqual # everything is meant to give up after 6 levels. eq(r([[[[[[[]]]]]]]), "[[[[[[[]]]]]]]") eq(r([[[[[[[[]]]]]]]]), "[[[[[[[...]]]]]]]") @@ -183,7 +183,7 @@ class ReprTests(unittest.TestCase): pass def test_descriptors(self): - eq = self.assertEquals + eq = self.assertEqual # method descriptors eq(repr(dict.items), "<method 'items' of 'dict' objects>") # XXX member descriptors @@ -244,7 +244,7 @@ class LongReprTest(unittest.TestCase): del sys.path[0] def test_module(self): - eq = self.assertEquals + eq = self.assertEqual touch(os.path.join(self.subpkgname, self.pkgname + os.extsep + 'py')) from areallylongpackageandmodulenametotestreprtruncation.areallylongpackageandmodulenametotestreprtruncation import areallylongpackageandmodulenametotestreprtruncation eq(repr(areallylongpackageandmodulenametotestreprtruncation), @@ -252,7 +252,7 @@ class LongReprTest(unittest.TestCase): eq(repr(sys), "<module 'sys' (built-in)>") def test_type(self): - eq = self.assertEquals + eq = self.assertEqual touch(os.path.join(self.subpkgname, 'foo'+os.extsep+'py'), '''\ class foo(object): pass @@ -287,7 +287,7 @@ class baz: "<%s.baz instance at 0x" % baz.__name__)) def test_method(self): - eq = self.assertEquals + eq = self.assertEqual touch(os.path.join(self.subpkgname, 'qux'+os.extsep+'py'), '''\ class aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa: def amethod(self): pass |
