(self)
| 2873 | self.assertEqual(self.zip2.read("zero"), self.plain2) |
| 2874 | |
| 2875 | def test_unicode_password(self): |
| 2876 | expected_msg = "pwd: expected bytes, got str" |
| 2877 | |
| 2878 | with self.assertRaisesRegex(TypeError, expected_msg): |
| 2879 | self.zip.setpassword("unicode") |
| 2880 | |
| 2881 | with self.assertRaisesRegex(TypeError, expected_msg): |
| 2882 | self.zip.read("test.txt", "python") |
| 2883 | |
| 2884 | with self.assertRaisesRegex(TypeError, expected_msg): |
| 2885 | self.zip.open("test.txt", pwd="python") |
| 2886 | |
| 2887 | with self.assertRaisesRegex(TypeError, expected_msg): |
| 2888 | self.zip.extract("test.txt", pwd="python") |
| 2889 | |
| 2890 | with self.assertRaisesRegex(TypeError, expected_msg): |
| 2891 | self.zip.pwd = "python" |
| 2892 | self.zip.open("test.txt") |
| 2893 | |
| 2894 | def test_seek_tell(self): |
| 2895 | self.zip.setpassword(b"python") |
nothing calls this directly
no test coverage detected