Message180857
Ezio, is it a good factorization?
def check(self, coder):
def checker(input, expect):
self.assertEqual(coder(input), (expect, len(input)))
return checker
def test_escape_decode(self):
decode = codecs.unicode_escape_decode
check = self.check(decode)
check(b"[\\\n]", "[]")
check(br'[\"]', '["]')
check(br"[\']", "[']")
# other 20 checks ...
And same for test_escape_encode and for bytes escape decoder. |
|
Date |
User |
Action |
Args |
2013-01-28 14:20:52 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, ezio.melotti |
2013-01-28 14:20:52 | serhiy.storchaka | set | messageid: <1359382852.61.0.210728828907.issue16979@psf.upfronthosting.co.za> |
2013-01-28 14:20:52 | serhiy.storchaka | link | issue16979 messages |
2013-01-28 14:20:52 | serhiy.storchaka | create | |
|