8000 `python_requires` not written when only `--min-py3-version` is specified · Issue #178 · asottile/setup-cfg-fmt · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
python_requires not written when only --min-py3-version is specified #178
Open
@mxr

Description

@mxr

See repro:

def test_guess_python_min_version(tmpdir):
    setup_cfg = tmpdir.join('setup.cfg')
    setup_cfg.write(
        '[metadata]\n'
        'name = pkg\n'
        'version = 1.0\n',
    )

    assert main((str(setup_cfg), '--min-py3-version=3.8'))
$ pytest -vvv -k test_guess_python_min_version tests/setup_cfg_fmt_test.py
========================================= test session starts ==========================================
platform darwin -- Python 3.9.15, pytest-6.2.4, py-1.10.0, pluggy-0.13.1 -- /Users/mxr/src/mxr/unkey/venv/bin/python
cachedir: .pytest_cache
rootdir: /Users/mxr/src/asottile/setup-cfg-fmt
collected 67 items / 66 deselected / 1 selected                                                        

tests/setup_cfg_fmt_test.py::test_guess_python_min_version FAILED                                [100%]

=============================================== FAILURES ===============================================
____________________________________ test_guess_python_min_version _____________________________________

tmpdir = local('/private/var/folders/mg/2_7nx7493qg0vn9jhdp951tw0000gp/T/pytest-of-mxr/pytest-10/test_guess_python_min_version0')

    def test_guess_python_min_version(tmpdir):
        setup_cfg = tmpdir.join('setup.cfg')
        setup_cfg.write(
            '[metadata]\n'
            'name = pkg\n'
            'version = 1.0\n',
        )
    
>       assert main((str(setup_cfg), '--min-py3-version=3.8'))
E       AssertionError: assert 0
E        +  where 0 = main(('/private/var/folders/mg/2_7nx7493qg0vn9jhdp951tw0000gp/T/pytest-of-mxr/pytest-10/test_guess_python_min_version0/setup.cfg', '--min-py3-version=3.8'))

tests/setup_cfg_fmt_test.py:667: AssertionError
======================================= short test summary info ========================================
FAILED tests/setup_cfg_fmt_test.py::test_guess_python_min_version - AssertionError: assert 0
=================================== 1 failed, 66 deselected in 0.17s ===================================

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0