Run test_official in a seperate travis job (#1491)

This commit is contained in:
Noam Meltzer 2019-08-28 22:58:58 +03:00 committed by GitHub
parent 425912da4a
commit b71196dad3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 6 deletions

View file

@ -7,6 +7,9 @@ matrix:
- python: 3.7
dist: xenial
sudo: true
- python: 3.7
dist: xenial
env: TEST_OFFICIAL=true
- python: pypy2.7-5.10.0
dist: xenial
- python: pypy3.5-5.10.1
@ -14,6 +17,7 @@ matrix:
allow_failures:
- python: pypy2.7-5.10.0
- python: pypy3.5-5.10.1
- env: TEST_OFFICIAL=true
dist: trusty
sudo: false
@ -40,8 +44,9 @@ install:
- if [[ $TRAVIS_PYTHON_VERSION != 'pypy'* ]]; then pip install ujson; fi
script:
- pytest -v -m nocoverage
- pytest -v -m "not nocoverage" --cov
- if [[ $TEST_OFFICIAL != 'true' ]]; then pytest -v -m nocoverage; fi
- if [[ $TEST_OFFICIAL != 'true' ]]; then pytest -v -m "not nocoverage" --cov; fi
- if [[ $TEST_OFFICIAL == 'true' ]]; then pytest -v tests/test_official.py; fi
after_success:
- coverage combine

View file

@ -16,9 +16,8 @@
#
# You should have received a copy of the GNU Lesser Public License
# along with this program. If not, see [http://www.gnu.org/licenses/].
import os
import inspect
import sys
from platform import python_implementation
import certifi
import pytest
@ -149,7 +148,7 @@ for thing in soup.select('h4 > a.anchor'):
@pytest.mark.parametrize(('method', 'data'), argvalues=argvalues, ids=names)
@pytest.mark.skipif(not sys.version_info >= (3, 7) or python_implementation() != 'CPython',
reason='follow_wrapped (inspect.signature) is not supported on this platform')
@pytest.mark.skipif(os.getenv('TEST_OFFICIAL') != 'true',
reason='test_official is not enabled')
def test_official(method, data):
method(data)