(self)
| 1868 | socket.close(-1) |
| 1869 | |
| 1870 | def test_makefile_mode(self): |
| 1871 | for mode in 'r', 'rb', 'rw', 'w', 'wb': |
| 1872 | with self.subTest(mode=mode): |
| 1873 | with socket.socket() as sock: |
| 1874 | encoding = None if "b" in mode else "utf-8" |
| 1875 | with sock.makefile(mode, encoding=encoding) as fp: |
| 1876 | self.assertEqual(fp.mode, mode) |
| 1877 | |
| 1878 | def test_makefile_invalid_mode(self): |
| 1879 | for mode in 'rt', 'x', '+', 'a': |
nothing calls this directly
no test coverage detected