(self)
| 1190 | self.assertEqual(f.read(), "foobar") |
| 1191 | |
| 1192 | def test_newline(self): |
| 1193 | # Test with explicit newline (universal newline mode disabled). |
| 1194 | text = self.TEXT.decode("ascii") |
| 1195 | with self.open(self.filename, "wt", encoding="utf-8", newline="\n") as f: |
| 1196 | f.write(text) |
| 1197 | with self.open(self.filename, "rt", encoding="utf-8", newline="\r") as f: |
| 1198 | self.assertEqual(f.readlines(), [text]) |
| 1199 | |
| 1200 | |
| 1201 | def tearDownModule(): |
nothing calls this directly
no test coverage detected