From f64b309ff09313c522e87a5c2a4b1e6a5a2b921d Mon Sep 17 00:00:00 2001 From: Dave Halter Date: Sun, 4 May 2014 12:31:21 +0200 Subject: [PATCH] carriage return test for statements that continue, even though they shouldn't --- test/test_parser/test_parser.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/test/test_parser/test_parser.py b/test/test_parser/test_parser.py index 408f48ae..384e7777 100644 --- a/test/test_parser/test_parser.py +++ b/test/test_parser/test_parser.py @@ -108,3 +108,14 @@ def test_end_pos(): scope = parser.module.subscopes[0] assert scope.start_pos == (3, 0) assert scope.end_pos == (5, 0) + + +def test_carriage_return_statements(): + source = u(dedent(''' + foo = 'ns1!' + + # this is a namespace package + ''')) + source = source.replace('\n', '\r\n') + stmt = Parser(source).module.statements[0] + assert '#' not in stmt.get_code()