[New-bugs-announce] [issue14633] test_find_module_encoding should test for a less specific message (or

Eric Snow report at bugs.python.org
Fri Apr 20 17:18:59 CEST 2012


New submission from Eric Snow <ericsnowcurrently at gmail.com>:

test_find_module_encoding (in Lib/test/test_imp.py), has the following check:

    self.assertRaisesRegex(SyntaxError,
        r"Non-UTF-8 code starting with '\\xf6'"
        r" in file .*badsyntax_pep3120.py",
        imp.find_module, 'badsyntax_pep3120', path)

It may be worth changing to something like this (aligning with the changes in issue14629):

    self.assertRaisesRegex(SyntaxError,
        r"invalid or missing encoding declaration",
        imp.find_module, 'badsyntax_pep3120', path)

----------
messages: 158837
nosy: brett.cannon, eric.snow
priority: normal
severity: normal
status: open
title: test_find_module_encoding should test for a less specific message (or

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue14633>
_______________________________________


More information about the New-bugs-announce mailing list