(self)
| 759 | open = _pyio.open |
| 760 | |
| 761 | def test_open_code(self): |
| 762 | # Check that the default behaviour of open_code matches |
| 763 | # open("rb") |
| 764 | with self.FileIO(__file__, "rb") as f: |
| 765 | expected = f.read() |
| 766 | with check_warnings(quiet=True) as w: |
| 767 | # Always test _open_code_with_warning |
| 768 | with _pyio._open_code_with_warning(__file__) as f: |
| 769 | actual = f.read() |
| 770 | self.assertEqual(expected, actual) |
| 771 | self.assertNotEqual(w.warnings, []) |
| 772 | |
| 773 | |
| 774 | def tearDownModule(): |
nothing calls this directly
no test coverage detected