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

Method test_bad_password

Lib/test/test_zipfile/test_core.py:2862–2866  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2860 self.assertRaises(RuntimeError, self.zip2.read, "zero")
2861
2862 def test_bad_password(self):
2863 self.zip.setpassword(b"perl")
2864 self.assertRaises(RuntimeError, self.zip.read, "test.txt")
2865 self.zip2.setpassword(b"perl")
2866 self.assertRaises(RuntimeError, self.zip2.read, "zero")
2867
2868 @requires_zlib()
2869 def test_good_password(self):

Callers

nothing calls this directly

Calls 2

setpasswordMethod · 0.80
assertRaisesMethod · 0.45

Tested by

no test coverage detected