diff --git a/tests/test_parsy.py b/tests/test_parsy.py index ba08f56..f699508 100644 --- a/tests/test_parsy.py +++ b/tests/test_parsy.py @@ -162,6 +162,12 @@ def test_concat(self): self.assertEqual(parser.parse(""), "") self.assertEqual(parser.parse("abc"), "abc") + def test_concat_from_byte_stream(self): + any_byte = parsy_test_item(lambda c: True, "any byte") + parser = any_byte.map(lambda b: b.decode("ascii")).many().concat() + self.assertEqual(parser.parse(b""), "") + self.assertEqual(parser.parse(b"abc"), "abc") + def test_generate(self): x = y = None