(self)
| 727 | self.assertEqual(reader.read(), s1) |
| 728 | |
| 729 | def test_invalid_modes(self): |
| 730 | for mode in ('U', 'rU', 'r+U'): |
| 731 | with self.assertRaises(ValueError) as cm: |
| 732 | codecs_open_no_warn(os_helper.TESTFN, mode, encoding=self.encoding) |
| 733 | self.assertIn('invalid mode', str(cm.exception)) |
| 734 | |
| 735 | for mode in ('rt', 'wt', 'at', 'r+t'): |
| 736 | with self.assertRaises(ValueError) as cm: |
| 737 | codecs_open_no_warn(os_helper.TESTFN, mode, encoding=self.encoding) |
| 738 | self.assertIn("can't have text and binary mode at once", |
| 739 | str(cm.exception)) |
| 740 | |
| 741 | |
| 742 | class UTF16LETest(ReadTest, unittest.TestCase): |
nothing calls this directly
no test coverage detected