(self, func)
| 545 | assertInvalidChar(b"xxxB\nP\thU'D v/F+", ignorechars=b" \n\tv") |
| 546 | |
| 547 | def _common_test_wrapcol(self, func): |
| 548 | eq = self.assertEqual |
| 549 | data = self.data |
| 550 | expected = func(data) |
| 551 | eq(func(data, wrapcol=0), expected) |
| 552 | eq(func(data, wrapcol=8000), expected) |
| 553 | eq(func(b'', wrapcol=0), func(b'')) |
| 554 | eq(func(b'', wrapcol=1), func(b'')) |
| 555 | eq(func(data, wrapcol=sys.maxsize), expected) |
| 556 | if check_impl_detail(): |
| 557 | eq(func(data, wrapcol=sys.maxsize*2), expected) |
| 558 | with self.assertRaises(OverflowError): |
| 559 | func(data, wrapcol=2**1000) |
| 560 | with self.assertRaises(ValueError): |
| 561 | func(data, wrapcol=-80) |
| 562 | with self.assertRaises(TypeError): |
| 563 | func(data, wrapcol=80.0) |
| 564 | with self.assertRaises(TypeError): |
| 565 | func(data, wrapcol='80') |
| 566 | with self.assertRaises(TypeError): |
| 567 | func(data, wrapcol=None) |
| 568 | |
| 569 | def test_ascii85_wrapcol(self): |
| 570 | # Test Ascii85 splitting lines |
no test coverage detected