Issue #9319: Fix a crash on parsing a Python source code without encoding

cookie and not valid in UTF-8: use "<file>" as the filename instead of
reading from NULL.
This commit is contained in:
Victor Stinner 2011-04-23 00:41:19 +02:00
parent 5569e9b150
commit c68b6aaec8
2 changed files with 7 additions and 1 deletions

View file

@ -170,6 +170,9 @@ class ImportTests(unittest.TestCase):
support.unlink(init_file_name + ext)
support.rmtree(test_package_name)
def test_issue9319(self):
imp.find_module("test/badsyntax_pep3120")
class ReloadTests(unittest.TestCase):