(self)
| 531 | |
| 532 | @unittest.expectedFailure # TODO: RUSTPYTHON |
| 533 | def test_roundtrip_quoteed_newlines(self): |
| 534 | rows = [ |
| 535 | ['\na', 'b\nc', 'd\n'], |
| 536 | ['\re', 'f\rg', 'h\r'], |
| 537 | ['\r\ni', 'j\r\nk', 'l\r\n'], |
| 538 | ['\n\rm', 'n\n\ro', 'p\n\r'], |
| 539 | ['\r\rq', 'r\r\rs', 't\r\r'], |
| 540 | ['\n\nu', 'v\n\nw', 'x\n\n'], |
| 541 | ] |
| 542 | for lineterminator in '\r\n', '\n', '\r': |
| 543 | with self.subTest(lineterminator=lineterminator): |
| 544 | with TemporaryFile("w+", encoding="utf-8", newline='') as fileobj: |
| 545 | writer = csv.writer(fileobj, lineterminator=lineterminator) |
| 546 | writer.writerows(rows) |
| 547 | fileobj.seek(0) |
| 548 | for i, row in enumerate(csv.reader(fileobj)): |
| 549 | self.assertEqual(row, rows[i]) |
| 550 | |
| 551 | @unittest.expectedFailure # TODO: RUSTPYTHON |
| 552 | def test_roundtrip_escaped_unquoted_newlines(self): |
nothing calls this directly
no test coverage detected