File indexing completed on 2025-01-18 10:17:52
0001 import pytest
0002
0003 from pybind11_tests import const_name as m
0004
0005
0006 @pytest.mark.parametrize("func", (m.const_name_tests, m.underscore_tests))
0007 @pytest.mark.parametrize(
0008 "selector, expected",
0009 enumerate(
0010 (
0011 "",
0012 "A",
0013 "Bd",
0014 "Cef",
0015 "%",
0016 "%",
0017 "T1",
0018 "U2",
0019 "D1",
0020 "E2",
0021 "KeepAtEnd",
0022 )
0023 ),
0024 )
0025 def test_const_name(func, selector, expected):
0026 if isinstance(func, str):
0027 pytest.skip(func)
0028 text = func(selector)
0029 assert text == expected