mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Issue #7435: Remove duplicate int/long tests, and other
references to long in py3k. Patch provided by flox.
This commit is contained in:
parent
c39aad7c27
commit
5c2db37c20
14 changed files with 64 additions and 607 deletions
|
@ -1071,7 +1071,6 @@ class MixinStrUnicodeUserStringTest:
|
|||
|
||||
longvalue = sys.maxsize + 10
|
||||
slongvalue = str(longvalue)
|
||||
if slongvalue[-1] in ("L","l"): slongvalue = slongvalue[:-1]
|
||||
self.checkequal(' 42', '%3ld', '__mod__', 42)
|
||||
self.checkequal('42', '%d', '__mod__', 42.0)
|
||||
self.checkequal(slongvalue, '%d', '__mod__', longvalue)
|
||||
|
@ -1086,7 +1085,7 @@ class MixinStrUnicodeUserStringTest:
|
|||
self.checkraises(ValueError, '%(foo', '__mod__', {})
|
||||
self.checkraises(TypeError, '%(foo)s %(bar)s', '__mod__', ('foo', 42))
|
||||
self.checkraises(TypeError, '%d', '__mod__', "42") # not numeric
|
||||
self.checkraises(TypeError, '%d', '__mod__', (42+0j)) # no int/long conversion provided
|
||||
self.checkraises(TypeError, '%d', '__mod__', (42+0j)) # no int conversion provided
|
||||
|
||||
# argument names with properly nested brackets are supported
|
||||
self.checkequal('bar', '%((foo))s', '__mod__', {'(foo)': 'bar'})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue