fix several compile() issues by translating newlines in the tokenizer

This commit is contained in:
Benjamin Peterson 2009-11-12 23:39:44 +00:00
parent c4cd6d3765
commit e36199b49d
8 changed files with 96 additions and 30 deletions

View file

@ -295,10 +295,6 @@ class CodeopTests(unittest.TestCase):
self.assertNotEquals(compile_command("a = 1\n", "abc").co_filename,
compile("a = 1\n", "def", 'single').co_filename)
def test_no_universal_newlines(self):
code = compile_command("'\rfoo\r'", symbol='eval')
self.assertEqual(eval(code), '\rfoo\r')
def test_main():
run_unittest(CodeopTests)