[issue41040] Fix test_modulefinder

Serhiy Storchaka report at bugs.python.org
Fri Jun 19 16:06:42 EDT 2020


New submission from Serhiy Storchaka <storchaka+cpython at gmail.com>:

There is a bug in test_modulefinder. The bytes string literal contains \u2090.

1. Since \u is not recognized escape sequence in bytes literals, compiling the file emits a deprecation warning:

/home/serhiy/py/cpython/Lib/test/test_modulefinder.py:281: DeprecationWarning: invalid escape sequence \u
  b"""\

2. b"\u2090" is interpreted as b"\\u2090", but actually the test implies that it should be a bytes sequence b'\xe2\x82\x90' which is valid in UTF-8 but is not a valid in CP1252.

----------
components: Tests
messages: 371897
nosy: serhiy.storchaka
priority: normal
severity: normal
status: open
title: Fix test_modulefinder
type: behavior
versions: Python 3.10, Python 3.7, Python 3.8, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41040>
_______________________________________


More information about the Python-bugs-list mailing list