Make third party stubtest output more succinct (#7853)

stubtest_third_party.py will now only print a single line when the test
succeeds for a certain distribution, unless the "-v" option is given.
When the test fails or "-v" is given, will still print the full output.

The success status is now colored to make spotting failures easier.

stdout/stderr is now used consistently: The distribution name and
success status is always printed to stdout, all other output goes to
stderr. Running the script with "2>/dev/null" will only show the success
status of the test, one per line.
This commit is contained in:
Sebastian Rittau
2022-05-18 01:10:58 +02:00
committed by GitHub
parent 7ca8303672
commit b65ef3a722
3 changed files with 69 additions and 28 deletions

View File

@@ -51,7 +51,7 @@ jobs:
with:
python-version: 3.9
- name: Install dependencies
run: pip install $(grep tomli== requirements-tests.txt)
run: pip install $(grep tomli== requirements-tests.txt) termcolor
- name: Install apt packages
run: |
sudo apt update

View File

@@ -80,14 +80,14 @@ jobs:
version: ${{ env.PYRIGHT_VERSION }}
python-platform: ${{ matrix.python-platform }}
python-version: ${{ matrix.python-version }}
no-comments: ${{ matrix.python-version != '3.9' || matrix.python-platform != 'Linux' }} # Having each job create the same comment is too noisy.
no-comments: ${{ matrix.python-version != '3.9' || matrix.python-platform != 'Linux' }} # Having each job create the same comment is too noisy.
project: ./pyrightconfig.stricter.json
- uses: jakebailey/pyright-action@v1
with:
version: ${{ env.PYRIGHT_VERSION }}
python-platform: ${{ matrix.python-platform }}
python-version: ${{ matrix.python-version }}
no-comments: ${{ matrix.python-version != '3.9' || matrix.python-platform != 'Linux' }} # Having each job create the same comment is too noisy.
no-comments: ${{ matrix.python-version != '3.9' || matrix.python-platform != 'Linux' }} # Having each job create the same comment is too noisy.
stubtest-stdlib:
name: Check stdlib with stubtest
@@ -124,7 +124,7 @@ jobs:
with:
python-version: 3.9
- name: Install dependencies
run: pip install $(grep tomli== requirements-tests.txt)
run: pip install $(grep tomli== requirements-tests.txt) termcolor
- name: Run stubtest
run: |
STUBS=$(