add testing with PyPy on Linux via Travis-CI

This commit is contained in:
Tal Einat 2020-04-17 02:08:16 +03:00
parent 55fc21e469
commit edb11b0a41
No known key found for this signature in database
GPG Key ID: 613A98AF4C800CDA
4 changed files with 30 additions and 15 deletions

View File

@ -35,6 +35,18 @@ matrix:
- python: "3.8"
env:
- TOXENV=py38-with_coverage
- python: "pypy"
env:
- TOXENV=pypy-without_coverage
- python: "pypy"
env:
- TOXENV=pypy-with_coverage
- python: "pypy3"
env:
- TOXENV=pypy3-without_coverage
- python: "pypy3"
env:
- TOXENV=pypy3-with_coverage
install:
- pip install coveralls

View File

@ -68,7 +68,8 @@ For more info, see the `documentation <http://fuzzysearch.rtfd.org>`_.
Installation
------------
``fuzzysearch`` supports Python versions 2.7 and 3.5+.
``fuzzysearch`` supports Python versions 2.7 and 3.5+, as well as PyPy 2.7 and
3.6.
.. code::

View File

@ -136,6 +136,7 @@ def run_setup(with_binary=True):
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
'Topic :: Software Development :: Libraries :: Python Modules',
],
cmdclass={'build_ext': ve_build_ext},

29
tox.ini
View File

@ -1,5 +1,5 @@
[tox]
envlist = py{27,35,36,37,38}-{with,without}_coverage-{,appveyor}
envlist = {py27,py35,py36,py37,py38,pypy,pypy3}-{with,without}_coverage-{,appveyor}
[testenv]
install_command =
@ -13,11 +13,10 @@ install_command =
deps =
; use specific versions of testing tools with which this is known to work
with_coverage: coverage>=5,<6
py{27}: unittest2==1.1.0
py{27}: mock==1.3.0
py{27}: biopython<=1.76
py{35}: biopython<=1.76
py{36,37,38}: biopython
{py27,pypy}: unittest2==1.1.0
{py27,pypy}: mock==1.3.0
{py27,py35}: biopython<=1.76
{py36,py37,py38,pypy3}: biopython
whitelist_externals =
mv
commands =
@ -26,16 +25,16 @@ commands =
; * if running with coverage, merge the coverage run results from both runs
; * for Python 2.6 use the unit2 script since -m unittest2 doesn't work
; (but when running with coverage, coverage run -m unittest2 works)
py{27}-without_coverage: {envbindir}/unit2 discover tests -t {toxinidir}
py{27}-with_coverage: {envbindir}/coverage run --source=fuzzysearch -m unittest2 discover tests
py{35,36,37,38}-without_coverage: {envpython} -m unittest discover tests
py{35,36,37,38}-with_coverage: {envbindir}/coverage run --source=fuzzysearch -m unittest discover tests
{py27,pypy}-without_coverage: {envbindir}/unit2 discover tests -t {toxinidir}
{py27,pypy}-with_coverage: {envbindir}/coverage run --source=fuzzysearch -m unittest2 discover tests
{py35,py36,py37,py38,pypy3}-without_coverage: {envpython} -m unittest discover tests
{py35,py36,py37,py38,pypy3}-with_coverage: {envbindir}/coverage run --source=fuzzysearch -m unittest discover tests
with_coverage: mv .coverage .coverage.with_extensions
{envpython} -c 'import os; [os.remove(os.path.join(d, fn)) for (d, dns, fns) in os.walk(os.path.join(r"{envsitepackagesdir}", "fuzzysearch")) for fn in fns if fn.endswith((".so", ".pyd"))]'
py{27}-without_coverage: {envbindir}/unit2 discover tests -t {toxinidir}
py{27}-with_coverage: {envbindir}/coverage run --source=fuzzysearch -m unittest2 discover tests
py{35,36,37,38}-without_coverage: {envpython} -m unittest discover tests
py{35,36,37,38}-with_coverage: {envbindir}/coverage run --source=fuzzysearch -m unittest discover tests
{py27,pypy}-without_coverage: {envbindir}/unit2 discover tests -t {toxinidir}
{py27,pypy}-with_coverage: {envbindir}/coverage run --source=fuzzysearch -m unittest2 discover tests
{py35,py36,py37,py38,pypy3}-without_coverage: {envpython} -m unittest discover tests
{py35,py36,py37,py38,pypy3}-with_coverage: {envbindir}/coverage run --source=fuzzysearch -m unittest discover tests
with_coverage: mv .coverage .coverage.no_extensions
with_coverage: {envbindir}/coverage combine
basepython =
@ -44,4 +43,6 @@ basepython =
py36: python3.6
py37: python3.7
py38: python3.8
pypy: pypy
pypy3: pypy3
appveyor: {env:PYTHON:}\\python.exe