From b71196dad35e8a364baf893b36b6e3df54b4e43b Mon Sep 17 00:00:00 2001 From: Noam Meltzer Date: Wed, 28 Aug 2019 22:58:58 +0300 Subject: [PATCH] Run test_official in a seperate travis job (#1491) --- .travis.yml | 9 +++++++-- tests/test_official.py | 7 +++---- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 13ae5e05b..2d5e7b9c1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 diff --git a/tests/test_official.py b/tests/test_official.py index 65624d330..7557baa71 100644 --- a/tests/test_official.py +++ b/tests/test_official.py @@ -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)