Skip to content

Commit

Permalink
Merge pull request #234 from lazka/pytest-no-mypy
Browse files Browse the repository at this point in the history
Don't run mypy via pytest
  • Loading branch information
lazka authored Apr 28, 2021
2 parents 0377206 + b576a2d commit dd1fd65
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 20 deletions.
9 changes: 2 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
- name: Install dependencies
shell: msys2 {0}
run: |
python -m pip install pytest coverage hypothesis mypy
python -m pip install pytest coverage hypothesis
- name: Run tests
shell: msys2 {0}
Expand Down Expand Up @@ -68,6 +68,7 @@ jobs:
- name: Run tests
run: |
poetry run python setup.py test
poetry run mypy .
ubuntu:
runs-on: ubuntu-latest
Expand All @@ -89,9 +90,6 @@ jobs:
sudo apt-get install -y libcairo2-dev
python -m pip install --upgrade setuptools
python -m pip install --upgrade pytest flake8 sphinx sphinx_rtd_theme coverage hypothesis attrs wheel
if [[ "${{ matrix.python-version }}" != "pypy3" ]]; then
python -m pip install --upgrade mypy
fi
if [[ "${{ matrix.python-version }}" != "pypy3" ]] && [[ "${{ matrix.python-version }}" != "3.8" ]] && [[ "${{ matrix.python-version }}" != "3.9.0-rc.1 - 3.9" ]]; then
python -m pip install --upgrade pygame
fi
Expand Down Expand Up @@ -148,7 +146,6 @@ jobs:
python -m pip install --upgrade wheel
python -m pip install --upgrade setuptools
python -m pip install --upgrade pytest flake8 sphinx sphinx_rtd_theme coverage hypothesis attrs
python -m pip install --upgrade mypy || true
python -m pip install --upgrade pygame
python -m coverage run --branch setup.py test
python -m coverage xml -i
Expand Down Expand Up @@ -180,7 +177,6 @@ jobs:
python -m pip install --upgrade wheel
python -m pip install --upgrade setuptools
python -m pip install --upgrade pytest flake8 sphinx sphinx_rtd_theme coverage hypothesis attrs
python -m pip install --upgrade mypy || true
python -m pip install --upgrade pygame
python -m coverage run --branch setup.py test
python -m coverage xml -i
Expand Down Expand Up @@ -220,7 +216,6 @@ jobs:
source ../venv/bin/activate
python -m pip install --upgrade setuptools
python -m pip install --upgrade pytest flake8 sphinx sphinx_rtd_theme coverage hypothesis attrs wheel
python -m pip install --upgrade mypy || true
# run tests
python -m coverage run --branch setup.py test
python -m coverage xml -i
Expand Down
13 changes: 0 additions & 13 deletions tests/test_typing.py
Original file line number Diff line number Diff line change
@@ -1,21 +1,8 @@
import os
import io
import sys
import types

import cairo
import pytest

mypy = pytest.importorskip("mypy.api")
pytestmark = pytest.mark.skipif(
sys.version_info[:2] < (3, 6), reason="Py3.6 only")
pytestmark


def test_mypy():
out, err, status = mypy.run([os.path.dirname(cairo.__path__[0])])
if status != 0:
raise Exception("\n" + "\n".join([out, err]))


def test_typing():
Expand Down

0 comments on commit dd1fd65

Please sign in to comment.