diff options
Diffstat (limited to 'Lib/test/test_descr.py')
-rw-r--r-- | Lib/test/test_descr.py | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/Lib/test/test_descr.py b/Lib/test/test_descr.py index bcbd096..7dc8442 100644 --- a/Lib/test/test_descr.py +++ b/Lib/test/test_descr.py @@ -2126,17 +2126,14 @@ def inherits(): 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__ - vereq(str(octlong(3) + 5), "010") + vereq(str(octlong(3) + 5), "0o10") # (Note that overriding __radd__ here only seems to work # because the example uses a short int left argument.) - vereq(str(5 + octlong(3000)), "05675") + vereq(str(5 + octlong(3000)), "0o5675") a = octlong(12345) vereq(a, 12345) vereq(int(a), 12345) |