Skip to content

Report failed if \u001d presented in the sources #1512

Closed
@romantolkachyov

Description

@romantolkachyov

Describe the bug

Failed to build report if some of the source files contains \u001d unicode character (GS):

Couldn't parse '/opt/app/tests/module_tests.py' as Python source: 'EOF in multi-line statement' at line 3306

And there is no such a line in the file (there is less than 3100 lines at all)

To Reproduce
How can we reproduce the problem? Please be specific. Don't link to a failing CI job. Answer the questions below:

  1. What version of Python are you using?
    Python 3.9.16
  2. What version of coverage.py shows the problem? The output of coverage debug sys is helpful.
    6.5, 7.0
  3. What versions of what packages do you have installed? The output of pip freeze is helpful.
    Private repo, can't do so without modifications so useless
  4. What code shows the problem? Give us a specific commit of a specific repo that we can check out. If you've already worked around the problem, please provide a commit before that fix.
example = "�"
  1. What commands did you run?
python -m coverage run python manage.py test
python -m coverage html

Expected behavior
Report should be generated.

Additional context
Everything else works correctly: tests are passed and pylint check is successful

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions