introduced option to specify file encoding by d-chris · Pull Request #284 · scientific-python/pytest-doctestplus

i tried to implement some tests

but seems with with testdir.inline_run(p, "--doctest-plus-generate-diff=diff", "--text-file-encoding", encoding) that the DebugRunnerPlus has an issue.

Traceback (most recent call last):
  File "C:\Python313\Lib\doctest.py", line 1395, in __run
    exec(compile(example.source, filename, "single",
         ~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                 compileflags, True), test.globs)
                 ^^^^^^^^^^^^^^^^^^^
  File "<doctest test_file_encoding_utf8.f[0]>", line 1
    print(☆)
          ^
SyntaxError: invalid character '☆' (U+2606)`

see commit f91f597