MCPcopy Index your code
hub / github.com/python/cpython / test_makefile_invalid_mode

Method test_makefile_invalid_mode

Lib/test/test_socket.py:1929–1934  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1927 self.assertEqual(fp.mode, mode)
1928
1929 def test_makefile_invalid_mode(self):
1930 for mode in 'rt', 'x', '+', 'a':
1931 with self.subTest(mode=mode):
1932 with socket.socket() as sock:
1933 with self.assertRaisesRegex(ValueError, 'invalid mode'):
1934 sock.makefile(mode)
1935
1936 def test_pickle(self):
1937 sock = socket.socket()

Callers

nothing calls this directly

Calls 4

socketMethod · 0.80
assertRaisesRegexMethod · 0.80
subTestMethod · 0.45
makefileMethod · 0.45

Tested by

no test coverage detected