pip list from the virtual environment you are usingWhen parametrizing tests applying a list of test IDs, disable_test_id_escaping_and_forfeit_all_rights_to_community_support option doesn't work.
But it works when specifying an ID function.
import pytest
testdata = [True]
ids = ["้ใขในใญใผๆๅญ"]
idfn = lambda _: "้ใขในใญใผๆๅญ"
# it works
@pytest.mark.parametrize('a', testdata, ids=idfn)
def test_idfn(a):
assert a
# it doesn't work
@pytest.mark.parametrize('a', testdata, ids=ids)
def test_ids(a):
assert a

The full example code is here: https://github.com/akiomik/pytest-disable_test_id_escaping_option-doesnt-work
pip list
Package Version
-------------- -------
atomicwrites 1.3.0
attrs 19.1.0
more-itertools 7.0.0
pip 19.1.1
pluggy 0.11.0
py 1.8.0
pytest 4.5.0
setuptools 41.0.1
six 1.12.0
wcwidth 0.1.7
wheel 0.33.4
๐ I had no idea we had such an option -- though, as it says on the tin:
Keep in mind however that this might cause unwanted side effects and even bugs depending on the OS used and plugins currently installed, so use it at your own risk.
I suspect if you want this to work you'll need to patch the callsites that use ascii_escaped, though I wonder why we have this option at all ๐ค
Thank you! I know I understand the risk ๐
you'll need to patch the callsites that use ascii_escaped
It works by changing ascii_escaped to _ascii_escaped_by_config at _idvalset in python.py as you said.
At the least, I'd need this option because that improves readability of a test results. ๐
would you like to submit a patch that does that?
Yes!
sweet! looking forward to your contribution ๐
Most helpful comment
sweet! looking forward to your contribution ๐