Issue #7435: Remove duplicate int/long tests, and other

references to long in py3k.  Patch provided by flox.
This commit is contained in:
Mark Dickinson 2009-12-05 20:28:34 +00:00
parent c39aad7c27
commit 5c2db37c20
14 changed files with 64 additions and 607 deletions

View file

@ -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__