Skip to content

Commit

Permalink
pypy support in travis tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sonic182 committed Jan 26, 2021
1 parent 23d84d1 commit 054544b
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ install:
- pip install -r requirements.txt
- pip install -e .[test]
script:
- pytest --cov=aiosonic
- pytest --cov=aiosonic --doctest-modules --mypy --mypy-ignore-missing-imports
after_success:
coveralls
2 changes: 1 addition & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ steps:
pip install --upgrade pip setuptools wheel
pip install -r requirements.txt
pip install -e ".[test]"
pytest --cov=aiosonic --doctest-modules --junitxml=junit/test-results.xml --cov-report=xml --cov-report=html
pytest --cov=aiosonic --doctest-modules --junitxml=junit/test-results.xml --cov-report=xml --cov-report=html --mypy --mypy-ignore-missing-imports
timeoutInMinutes: 5
displayName: 'Run tests'
Expand Down
2 changes: 1 addition & 1 deletion pytest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ DJANGO_SETTINGS_MODULE = djangotestproj.djangotestproj.settings
python_files = **/*.py
testpaths = tests/
python_functions = test_*
addopts = --cov=aiosonic --cov-report term --cov-report html --mypy --mypy-ignore-missing-imports --doctest-modules
addopts = --cov=aiosonic --cov-report term --cov-report html --doctest-modules
filterwarnings =
ignore::UserWarning
10 changes: 9 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@ def version():
env_marker = (
"sys_platform != 'win32'"
" and sys_platform != 'cygwin'"
" and platform_python_implementation != 'pypy'"
" and platform_python_implementation != 'PyPy'"
)

pypy_marker = (
"platform_python_implementation != 'PyPy'"
)


Expand Down Expand Up @@ -76,6 +80,10 @@ def _map_func(dependency):
{
'uvloop': ' ;' + env_marker,
'httptools': ' ;' + env_marker,
'mypy': ' ;' + pypy_marker,
'mypy-extensions': ' ;' + pypy_marker,
'pytest-mypy': ' ;' + pypy_marker,
'typed-ast': ' ;' + pypy_marker,
}
)
}
Expand Down

0 comments on commit 054544b

Please sign in to comment.