(self)
| 1919 | socket.close(-1) |
| 1920 | |
| 1921 | def test_makefile_mode(self): |
| 1922 | for mode in 'r', 'rb', 'rw', 'w', 'wb': |
| 1923 | with self.subTest(mode=mode): |
| 1924 | with socket.socket() as sock: |
| 1925 | encoding = None if "b" in mode else "utf-8" |
| 1926 | with sock.makefile(mode, encoding=encoding) as fp: |
| 1927 | self.assertEqual(fp.mode, mode) |
| 1928 | |
| 1929 | def test_makefile_invalid_mode(self): |
| 1930 | for mode in 'rt', 'x', '+', 'a': |
nothing calls this directly
no test coverage detected