MCPcopy Create free account
hub / github.com/python/cpython / test_uninitialized

Method test_uninitialized

Lib/test/test_io/test_bufferedio.py:250–258  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

248 self.assertEqual(b"abc", bufio.read())
249
250 def test_uninitialized(self):
251 bufio = self.tp.__new__(self.tp)
252 del bufio
253 bufio = self.tp.__new__(self.tp)
254 self.assertRaisesRegex((ValueError, AttributeError),
255 'uninitialized|has no attribute',
256 bufio.read, 0)
257 bufio.__init__(self.MockRawIO())
258 self.assertEqual(bufio.read(0), b'')
259
260 def test_read(self):
261 for arg in (None, 7):

Callers 1

test_uninitializedMethod · 0.45

Calls 5

assertRaisesRegexMethod · 0.80
__new__Method · 0.45
__init__Method · 0.45
assertEqualMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected