diff --git a/.travis.yml b/.travis.yml index e215f2f..0f0a6be 100644 --- a/.travis.yml +++ b/.travis.yml @@ -54,6 +54,9 @@ jobs: - python: '3.8' env: - TOXENV=py38,report,codecov + - python: 'pypy3' + env: + - TOXENV=pypy3,report,codecov - python: '3.8' env: - TOXENV=doc diff --git a/tests/test_make.py b/tests/test_make.py index 68014b2..87ce245 100644 --- a/tests/test_make.py +++ b/tests/test_make.py @@ -396,6 +396,11 @@ class B: assert_dump_load(schema=schema, loaded=loaded, dumped=dumped) +# 3.6.9 is known to work, 3.6.1 is known to fail, not sure attrs vs. dataclasses +@pytest.mark.skipif( + condition=sys.implementation.name == "pypy" and sys.version_info < (3, 6, 9), + reason="Forward references and string annotations are broken.", +) def test_forward_reference_module_scope(): """Run the forward reference test at global scope.""" diff --git a/tox.ini b/tox.ini index 2cd3330..bf696ba 100644 --- a/tox.ini +++ b/tox.ini @@ -16,14 +16,13 @@ basepython = py38: {env:TOXPYTHON:python3.8} {doc,spell,bootstrap,clean,check,report,codecov}: {env:TOXTOOLPYTHON:python3.8} setenv = - PYTHONPATH={toxinidir}/tests PYTHONUNBUFFERED=yes passenv = * deps = -r {toxinidir}/test-requirements.txt commands = - pytest {posargs:--cov --cov-report=term-missing -vv --doctest-modules tests} + {envbindir}/pytest {posargs:--cov --cov-report=term-missing -vv --doctest-modules tests} [testenv:bootstrap] deps = @@ -31,54 +30,54 @@ deps = matrix skip_install = true commands = - python ci/bootstrap.py + {envpython} ci/bootstrap.py [testenv:check] deps = -r {toxinidir}/dev-requirements.txt skip_install = true commands = - python setup.py check --strict --metadata --restructuredtext - check-manifest {toxinidir} - black --check {toxinidir} - isort --verbose --check-only --diff --recursive src tests setup.py + {envpython} setup.py check --strict --metadata --restructuredtext + {envbindir}/check-manifest {toxinidir} + {envbindir}/black --check {toxinidir} + {envbindir}/isort --verbose --check-only --diff --recursive src tests setup.py [testenv:spell] setenv = SPELLCHECK=1 commands = - sphinx-build -b spelling docs dist/docs + {envbindir}/sphinx-build -b spelling docs dist/docs skip_install = true deps = -r{toxinidir}/docs/requirements.txt - sphinxcontrib-spelling - pyenchant + {envbindir}/sphinxcontrib-spelling + {envbindir}/pyenchant [testenv:doc] deps = -r{toxinidir}/docs/requirements.txt commands = - sphinx-apidoc -o docs/reference src/desert - pytest --doctest-modules --doctest-glob=*.rst src docs - sphinx-build {posargs:-E} -b html docs dist/docs - sphinx-build -b linkcheck docs dist/docs + {envbindir}/sphinx-apidoc -o docs/reference src/desert + {envbindir}/pytest --doctest-modules --doctest-glob=*.rst src docs + {envbindir}/sphinx-build {posargs:-E} -b html docs dist/docs + {envbindir}/sphinx-build -b linkcheck docs dist/docs [testenv:codecov] deps = codecov skip_install = true commands = - coverage xml --ignore-errors - codecov [] + {envbindir}/coverage xml --ignore-errors + {envbindir}/codecov [] [testenv:report] deps = coverage cuvner skip_install = true commands = - coverage report - coverage html + {envbindir}/coverage report + {envbindir}/coverage html [testenv:clean]