mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2024-12-22 22:45:09 +01:00
Run test_official in a seperate travis job (#1491)
This commit is contained in:
parent
425912da4a
commit
b71196dad3
2 changed files with 10 additions and 6 deletions
|
@ -7,6 +7,9 @@ matrix:
|
||||||
- python: 3.7
|
- python: 3.7
|
||||||
dist: xenial
|
dist: xenial
|
||||||
sudo: true
|
sudo: true
|
||||||
|
- python: 3.7
|
||||||
|
dist: xenial
|
||||||
|
env: TEST_OFFICIAL=true
|
||||||
- python: pypy2.7-5.10.0
|
- python: pypy2.7-5.10.0
|
||||||
dist: xenial
|
dist: xenial
|
||||||
- python: pypy3.5-5.10.1
|
- python: pypy3.5-5.10.1
|
||||||
|
@ -14,6 +17,7 @@ matrix:
|
||||||
allow_failures:
|
allow_failures:
|
||||||
- python: pypy2.7-5.10.0
|
- python: pypy2.7-5.10.0
|
||||||
- python: pypy3.5-5.10.1
|
- python: pypy3.5-5.10.1
|
||||||
|
- env: TEST_OFFICIAL=true
|
||||||
|
|
||||||
dist: trusty
|
dist: trusty
|
||||||
sudo: false
|
sudo: false
|
||||||
|
@ -40,8 +44,9 @@ install:
|
||||||
- if [[ $TRAVIS_PYTHON_VERSION != 'pypy'* ]]; then pip install ujson; fi
|
- if [[ $TRAVIS_PYTHON_VERSION != 'pypy'* ]]; then pip install ujson; fi
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- pytest -v -m nocoverage
|
- if [[ $TEST_OFFICIAL != 'true' ]]; then pytest -v -m nocoverage; fi
|
||||||
- pytest -v -m "not nocoverage" --cov
|
- 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:
|
after_success:
|
||||||
- coverage combine
|
- coverage combine
|
||||||
|
|
|
@ -16,9 +16,8 @@
|
||||||
#
|
#
|
||||||
# You should have received a copy of the GNU Lesser Public License
|
# You should have received a copy of the GNU Lesser Public License
|
||||||
# along with this program. If not, see [http://www.gnu.org/licenses/].
|
# along with this program. If not, see [http://www.gnu.org/licenses/].
|
||||||
|
import os
|
||||||
import inspect
|
import inspect
|
||||||
import sys
|
|
||||||
from platform import python_implementation
|
|
||||||
|
|
||||||
import certifi
|
import certifi
|
||||||
import pytest
|
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.parametrize(('method', 'data'), argvalues=argvalues, ids=names)
|
||||||
@pytest.mark.skipif(not sys.version_info >= (3, 7) or python_implementation() != 'CPython',
|
@pytest.mark.skipif(os.getenv('TEST_OFFICIAL') != 'true',
|
||||||
reason='follow_wrapped (inspect.signature) is not supported on this platform')
|
reason='test_official is not enabled')
|
||||||
def test_official(method, data):
|
def test_official(method, data):
|
||||||
method(data)
|
method(data)
|
||||||
|
|
Loading…
Reference in a new issue