mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
bpo-44712: Replace "type(literal)" with corresponding builtin types (GH-27294)
I suppose it is a remnants of very old code written when str, int, list, dict, etc were functions and not classes.
This commit is contained in:
parent
c826867b7c
commit
3680ebed7f
19 changed files with 41 additions and 39 deletions
|
@ -50,10 +50,10 @@ class CreationTestCase(unittest.TestCase):
|
|||
def testReturnType(self):
|
||||
# Test return type of gettimeout()
|
||||
self.sock.settimeout(1)
|
||||
self.assertEqual(type(self.sock.gettimeout()), type(1.0))
|
||||
self.assertIs(type(self.sock.gettimeout()), float)
|
||||
|
||||
self.sock.settimeout(3.9)
|
||||
self.assertEqual(type(self.sock.gettimeout()), type(1.0))
|
||||
self.assertIs(type(self.sock.gettimeout()), float)
|
||||
|
||||
def testTypeCheck(self):
|
||||
# Test type checking by settimeout()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue