diff options
author | Mark Dickinson <dickinsm@gmail.com> | 2009-12-05 20:28:34 (GMT) |
---|---|---|
committer | Mark Dickinson <dickinsm@gmail.com> | 2009-12-05 20:28:34 (GMT) |
commit | 5c2db37c20ad62097ffaaea32c7e332484c200e0 (patch) | |
tree | 9f88385ce641ffaa2587693bd38bc1d0f2cfb674 /Lib/test/test_descr.py | |
parent | c39aad7c278135e599489914e74cf939e39953e9 (diff) | |
download | cpython-5c2db37c20ad62097ffaaea32c7e332484c200e0.zip cpython-5c2db37c20ad62097ffaaea32c7e332484c200e0.tar.gz cpython-5c2db37c20ad62097ffaaea32c7e332484c200e0.tar.bz2 |
Issue #7435: Remove duplicate int/long tests, and other
references to long in py3k. Patch provided by flox.
Diffstat (limited to 'Lib/test/test_descr.py')
-rw-r--r-- | Lib/test/test_descr.py | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/Lib/test/test_descr.py b/Lib/test/test_descr.py index 0a51cd0..c31728e 100644 --- a/Lib/test/test_descr.py +++ b/Lib/test/test_descr.py @@ -248,10 +248,6 @@ class OperatorsTest(unittest.TestCase): else: self.fail("NotImplemented should have caused TypeError") - def test_longs(self): - # Testing long operations... - self.number_operators(100, 3) - def test_floats(self): # Testing float operations... self.number_operators(100.0, 3.0) @@ -259,7 +255,7 @@ class OperatorsTest(unittest.TestCase): def test_complexes(self): # Testing complex operations... self.number_operators(100.0j, 3.0j, skip=['lt', 'le', 'gt', 'ge', - 'int', 'long', 'float', + 'int', 'float', 'divmod', 'mod']) class Number(complex): @@ -1162,15 +1158,6 @@ order (MRO) for bases """ self.assertEqual(I(3)*2, 6) self.assertEqual(I(3)*I(2), 6) - # Test handling of long*seq and seq*long - class L(int): - pass - self.assertEqual("a"*L(2), "aa") - self.assertEqual(L(2)*"a", "aa") - self.assertEqual(2*L(3), 6) - self.assertEqual(L(3)*2, 6) - self.assertEqual(L(3)*L(2), 6) - # Test comparison of classes with dynamic metaclasses class dynamicmetaclass(type): pass @@ -2231,10 +2218,7 @@ order (MRO) for bases """ class octlong(int): __slots__ = [] def __str__(self): - s = oct(self) - if s[-1] == 'L': - s = s[:-1] - return s + return oct(self) def __add__(self, other): return self.__class__(super(octlong, self).__add__(other)) __radd__ = __add__ |