Skip to content

scripts/runtests.py cannot run tests/mypy_test.py #10599

Closed
@Screwtapello

Description

@Screwtapello

Steps to reproduce:

  1. clone a fresh copy of the repo

     git clone https://github.com/python/typeshed.git
     cd typeshed
    
  2. Set up a local development enviroment as described in CONTRIBUTING.md:

     python3 -m venv .venv
     .venv/bin/pip install -U pip
     .venv/bin/pip install -r requirements-tests.txt
    
  3. Run the local tests as described in tests/README.md:

     .venv/bin/python3 scripts/runtests.py stdlib/xml
    

Expected results:

  • All tests pass or are skipped

Actual results:

mypy tests fail:

Running mypy for Python 3.7...
usage: mypy_test.py [-h] [-x [EXCLUDE ...]] [-v] [-p [{3.12,3.11,3.10,3.9,3.8} ...]]
                    [--platform [{linux,win32,darwin} ...]]
                    [filter ...]
mypy_test.py: error: argument -p/--python-version: invalid choice: '3.7' (choose from '3.12', '3.11', '3.10', '3.9', '3.8')

It looks like #10559 removed "3.7" from the tests/mypy_test.py wrapper, so it would reject requests to test types in Python 3.7 style, but did not update scripts/runtests.py to stop asking for Python 3.7 style.

Adding "3.7" back to the list of acceptable Python versions in tests/mypy_test.py gets things working nicely for me; alternatively, updating scripts/runtests.py to ask for Python 3.8 support works too.

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