[issue24263] unittest cannot load module whose name starts with Unicode

Serhiy Storchaka report at bugs.python.org
Tue Jun 23 12:00:04 CEST 2015


Serhiy Storchaka added the comment:

r'[^\W\d]\w*' doesn't match all valid Python identifiers. It would be more correct to write the check as:

    root, ext = os.path.splitext(basename)
    if not (ext == '.py' and root.isidentifier()):
        # valid Python identifiers only
        return None, False

----------
nosy: +serhiy.storchaka
versions: +Python 3.6

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


More information about the Python-bugs-list mailing list