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

Method test_invalid_opening_mode

Lib/test/test_fileinput.py:231–235  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

229 self.assertEqual(fi.fileno(), -1)
230
231 def test_invalid_opening_mode(self):
232 for mode in ('w', 'rU', 'U'):
233 with self.subTest(mode=mode):
234 with self.assertRaises(ValueError):
235 FileInput(mode=mode)
236
237 def test_stdin_binary_mode(self):
238 with mock.patch('sys.stdin') as m_stdin:

Callers

nothing calls this directly

Calls 3

FileInputClass · 0.90
subTestMethod · 0.45
assertRaisesMethod · 0.45

Tested by

no test coverage detected