mirror of
https://github.com/python/cpython.git
synced 2025-07-29 06:05:00 +00:00
fix several compile() issues by translating newlines in the tokenizer
This commit is contained in:
parent
c4cd6d3765
commit
e36199b49d
8 changed files with 96 additions and 30 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue