Was comparing _getini_toml and _getini_ini after the addini type expression changes and noticed an inconsistency.
_getini_toml checks isinstance(value, str) for "string":
elif type == "string":
if not isinstance(value, str):
raise TypeError(...)
return value
_getini_ini just returns the value as-is:
elif type == "string":
return value
In [tool.pytest.ini_options], make_scalar keeps TOML arrays as lists instead of converting to str. So a TOML array for a type="string"
option makes _getini_ini return a list -- _getini_toml would raise.
"int" and "float" in _getini_ini already have the isinstance guard.
"string" is the only scalar type missing it.
Was comparing _getini_toml and _getini_ini after the addini type expression changes and noticed an inconsistency.
_getini_toml checks isinstance(value, str) for "string":
_getini_ini just returns the value as-is:
In [tool.pytest.ini_options], make_scalar keeps TOML arrays as lists instead of converting to str. So a TOML array for a type="string"
option makes _getini_ini return a list -- _getini_toml would raise.
"int" and "float" in _getini_ini already have the isinstance guard.
"string" is the only scalar type missing it.