-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Open
Labels
topic: fixturesanything involving fixtures directly or indirectlyanything involving fixtures directly or indirectlytype: enhancementnew feature or API change, should be merged into features branchnew feature or API change, should be merged into features branch
Description
makepyfile
is ignoring the encoding parameter, in both pytester
and testdir
fixtures.
found the issue working on windows with cp1252
encoding and using pytest-doctestplus
.
i traced the issue to makepyfile
, arguments and kwargs are passed unpacked.
make_file = testdir.makepyfile(
f"""
def f():
'''
>>> print('{a}')
{b}
'''
pass
""".encode(encoding=encoding),
encoding=encoding, # will be packed into `files` and default utf-8 encoding will be used
)
$ python --version
Python 3.13.2
$ pip freeze
colorama==0.4.6
iniconfig==2.0.0
packaging==24.2
pluggy==1.5.0
pytest==8.3.3
Metadata
Metadata
Assignees
Labels
topic: fixturesanything involving fixtures directly or indirectlyanything involving fixtures directly or indirectlytype: enhancementnew feature or API change, should be merged into features branchnew feature or API change, should be merged into features branch