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

Method _test_error

Lib/test/test_tarfile.py:2614–2617  ·  view source on GitHub ↗
(self, data)

Source from the content-addressed store, hash-verified

2612 # Append mode is supposed to fail if the tarfile to append to
2613 # does not end with a zero block.
2614 def _test_error(self, data):
2615 with open(self.tarname, "wb") as fobj:
2616 fobj.write(data)
2617 self.assertRaises(tarfile.ReadError, self._add_testfile)
2618
2619 def test_null(self):
2620 self._test_error(b"")

Callers 5

test_nullMethod · 0.95
test_incompleteMethod · 0.95
test_premature_eofMethod · 0.95
test_trailing_garbageMethod · 0.95
test_invalidMethod · 0.95

Calls 3

openFunction · 0.50
writeMethod · 0.45
assertRaisesMethod · 0.45

Tested by

no test coverage detected