MCPcopy Create free account
hub / github.com/pytest-dev/pytest / test_is_setup_py_different_encoding

Function test_is_setup_py_different_encoding

testing/test_doctest.py:1554–1561  ·  view source on GitHub ↗
(tmp_path: Path, mod: str)

Source from the content-addressed store, hash-verified

1552
1553@pytest.mark.parametrize("mod", ("setuptools", "distutils.core"))
1554def test_is_setup_py_different_encoding(tmp_path: Path, mod: str) -> None:
1555 setup_py = tmp_path.joinpath("setup.py")
1556 contents = (
1557 "# -*- coding: cp1252 -*-\n"
1558 'from {} import setup; setup(name="foo", description="€")\n'.format(mod)
1559 )
1560 setup_py.write_bytes(contents.encode("cp1252"))
1561 assert _is_setup_py(setup_py)
1562
1563
1564@pytest.mark.parametrize(

Callers

nothing calls this directly

Calls 2

_is_setup_pyFunction · 0.90
formatMethod · 0.45

Tested by

no test coverage detected