From e07f51387fb59e29762c293ec0e75d41842e2a56 Mon Sep 17 00:00:00 2001 From: Dave Halter Date: Fri, 18 Jul 2014 17:09:44 +0200 Subject: [PATCH] added a test for hex value issues in docstrings, see #427 --- test/test_parser/test_parser.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test/test_parser/test_parser.py b/test/test_parser/test_parser.py index c31e0455..7449b11e 100644 --- a/test/test_parser/test_parser.py +++ b/test/test_parser/test_parser.py @@ -125,3 +125,15 @@ def test_incomplete_list_comprehension(): """ Shouldn't raise an error, same bug as #418. """ s = Parser(u('(1 for def')).module.statements[0] assert s.expression_list() + + +def test_hex_values_in_docstring(): + source = r''' + def foo(object): + """ + \xff + """ + return 1 + ''' + + assert Parser(dedent(u(source))).module.subscopes[0].raw_doc == '\xff'