Index: Lib/test/test_compile.py =================================================================== --- Lib/test/test_compile.py (revision 45808) +++ Lib/test/test_compile.py (working copy) @@ -166,6 +166,14 @@ pass""" compile(s, "", "exec") + def test_indentation_comment_without_trailing_newline(self): + # testing compile() of an indented block followed by a comment or + # whitespace w/o trailing newline + s1 = "if 1:\n pass\n#comment" # comment + s2 = "if 1:\n pass\n " # whitespace + compile(s1, "", "exec") + compile(s2, "", "exec") + def test_literals_with_leading_zeroes(self): for arg in ["077787", "0xj", "0x.", "0e", "090000000000000", "080000000000000", "000000000000009", "000000000000008"]: