Skip to content

disable_test_id_escaping_and_forfeit_all_rights_to_community_support doesn't work when using list of IDs #5286

@akiomik

Description

@akiomik
  • a detailed description of the bug or suggestion
  • output of pip list from the virtual environment you are using
  • pytest and operating system versions
  • minimal example if possible

description

When 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

screenshot

The full example code is here: https://github.com/akiomik/pytest-disable_test_id_escaping_option-doesnt-work

environments

  • OS: macOS Mojave 10.14.4
  • pipenv: version 2018.11.26
  • python: 3.7.2
  • pytest: 4.5.0

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions