module documentation

Make sure that applying the configuration from pyproject.toml is equivalent to applying a similar configuration from setup.cfg To run these tests offline, please have a look on ``./downloads/preload.py``

Class TestDeprecatedFields Undocumented
Class TestMeta No class docstring; 2/2 methods documented
Class TestPresetField No class docstring; 2/5 methods documented
Function core_metadata Undocumented
Function makedist Undocumented
Function test_apply_pyproject_equivalent_to_setupcfg Undocumented
Function test_license_and_license_files Undocumented
Function test_no_explicit_content_type_for_missing_extension Undocumented
Function test_pep621_example Make sure the example in PEP 621 works
Function test_readme_content_type Undocumented
Function test_undefined_content_type Undocumented
Function test_utf8_maintainer_in_metadata Undocumented
Constant EXAMPLES_FILE Undocumented
Constant HERE Undocumented
Constant PEP621_EXAMPLE Undocumented
Constant PEP621_EXAMPLE_SCRIPT Undocumented
Constant PEP621_INTERNATIONAL_EMAIL_EXAMPLE Undocumented
Function _pep621_example_project Undocumented
def core_metadata(dist) -> str: (source)

Undocumented

def makedist(path, **attrs): (source)

Undocumented

@pytest.mark.parametrize('url', urls_from_file(HERE/EXAMPLES_FILE))
@pytest.mark.filterwarnings('ignore')
@pytest.mark.uses_network
def test_apply_pyproject_equivalent_to_setupcfg(url, monkeypatch, tmp_path): (source)

Undocumented

def test_license_and_license_files(tmp_path): (source)

Undocumented

def test_no_explicit_content_type_for_missing_extension(tmp_path): (source)

Undocumented

def test_pep621_example(tmp_path): (source)

Make sure the example in PEP 621 works

@pytest.mark.parametrize('readme, ctype', [('Readme.txt', 'text/plain'), ('readme.md', 'text/markdown'), ('text.rst', 'text/x-rst')])
def test_readme_content_type(tmp_path, readme, ctype): (source)

Undocumented

def test_undefined_content_type(tmp_path): (source)

Undocumented

@pytest.mark.parametrize(('pyproject_text', 'expected_maintainers_meta_value'), (pytest.param(PEP621_EXAMPLE, 'Brett Cannon <brett@python.org>, "John X. Ãørçeč" <john@utf8.org>, Γαμα קּ 東 <gama@utf8.org>', id='non-international-emails'), pytest.param(PEP621_INTERNATIONAL_EMAIL_EXAMPLE, 'Степан Бандера <криївка@оун-упа.укр>', marks=pytest.mark.xfail(reason='CPython\'s `email.headerregistry.Address` only supports RFC 5322, as of Nov 10, 2022 and latest Python 3.11.0', strict=True), id='international-email')))
def test_utf8_maintainer_in_metadata(expected_maintainers_meta_value, pyproject_text, tmp_path): (source)

Undocumented

EXAMPLES_FILE: str = (source)

Undocumented

Value
'setupcfg_examples.txt'

Undocumented

Value
Path(__file__).parent
PEP621_EXAMPLE: str = (source)

Undocumented

Value
'''[project]
name = "spam"
version = "2020.0.0"
description = "Lovely Spam! Wonderful Spam!"
readme = "README.rst"
requires-python = ">=3.8"
license = {file = "LICENSE.txt"}
...
PEP621_EXAMPLE_SCRIPT: str = (source)

Undocumented

Value
'''
def main_cli(): pass
def main_gui(): pass
def main_tomatoes(): pass
'''
PEP621_INTERNATIONAL_EMAIL_EXAMPLE: str = (source)

Undocumented

Value
'''[project]
name = "spam"
version = "2020.0.0"
authors = [
  {email = "hi@pradyunsg.me"},
  {name = "Tzu-Ping Chung"}
]
...
def _pep621_example_project(tmp_path, readme='README.rst', pyproject_text=PEP621_EXAMPLE): (source)

Undocumented