diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2022-05-08 14:10:11 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-08 14:10:11 (GMT) |
commit | 3680ebed7f3e529d01996dd0318601f9f0d02b4b (patch) | |
tree | 7889885b7ce3089f5ce5d02d88e7a55518644aae /Lib/test/test_timeout.py | |
parent | c826867b7c1bb69639290d8df0f850ec3f9a6c72 (diff) | |
download | cpython-3680ebed7f3e529d01996dd0318601f9f0d02b4b.zip cpython-3680ebed7f3e529d01996dd0318601f9f0d02b4b.tar.gz cpython-3680ebed7f3e529d01996dd0318601f9f0d02b4b.tar.bz2 |
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.
Diffstat (limited to 'Lib/test/test_timeout.py')
-rw-r--r-- | Lib/test/test_timeout.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_timeout.py b/Lib/test/test_timeout.py index fa85c7e..30e843a 100644 --- a/Lib/test/test_timeout.py +++ b/Lib/test/test_timeout.py @@ -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() |