MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_uninitialized

Method test_uninitialized

Lib/test/test_io.py:1488–1496  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1486 self.assertEqual(b"abc", bufio.read())
1487
1488 def test_uninitialized(self):
1489 bufio = self.tp.__new__(self.tp)
1490 del bufio
1491 bufio = self.tp.__new__(self.tp)
1492 self.assertRaisesRegex((ValueError, AttributeError),
1493 'uninitialized|has no attribute',
1494 bufio.read, 0)
1495 bufio.__init__(self.MockRawIO())
1496 self.assertEqual(bufio.read(0), b'')
1497
1498 def test_read(self):
1499 for arg in (None, 7):

Callers

nothing calls this directly

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