Azure pytest parallel (#27864)

* Azure pytest parallel

* Update azure-pipelines-ci.yml

* Remove test that does nothing
This commit is contained in:
Pascal Vizeli 2019-10-19 05:51:53 +02:00 committed by Paulus Schoutsen
parent 7ed659151c
commit 435cbb7f7e
2 changed files with 4 additions and 9 deletions

View file

@ -108,13 +108,13 @@ stages:
steps: steps:
- template: templates/azp-step-cache.yaml@azure - template: templates/azp-step-cache.yaml@azure
parameters: parameters:
keyfile: 'requirements_test_all.txt | homeassistant/package_constraints.txt' keyfile: 'requirements_test_all.txt | homeassistant/package_constraints.txt | "v2"'
build: | build: |
set -e set -e
python -m venv venv python -m venv venv
. venv/bin/activate . venv/bin/activate
pip install -U pip setuptools pytest-azurepipelines -c homeassistant/package_constraints.txt pip install -U pip setuptools pytest-azurepipelines pytest-xdist -c homeassistant/package_constraints.txt
pip install -r requirements_test_all.txt -c homeassistant/package_constraints.txt pip install -r requirements_test_all.txt -c homeassistant/package_constraints.txt
# This is a TEMP. Eventually we should make sure our 4 dependencies drop typing. # This is a TEMP. Eventually we should make sure our 4 dependencies drop typing.
# Find offending deps with `pipdeptree -r -p typing` # Find offending deps with `pipdeptree -r -p typing`
@ -127,7 +127,7 @@ stages:
set -e set -e
. venv/bin/activate . venv/bin/activate
pytest --timeout=9 --durations=10 -qq -o console_output_style=count -p no:sugar tests pytest --timeout=9 --durations=10 -n 2 --dist loadfile -qq -o console_output_style=count -p no:sugar tests
script/check_dirty script/check_dirty
displayName: 'Run pytest for python $(python.container)' displayName: 'Run pytest for python $(python.container)'
condition: and(succeeded(), ne(variables['python.container'], variables['PythonMain'])) condition: and(succeeded(), ne(variables['python.container'], variables['PythonMain']))
@ -135,7 +135,7 @@ stages:
set -e set -e
. venv/bin/activate . venv/bin/activate
pytest --timeout=9 --durations=10 --cov homeassistant --cov-report html -qq -o console_output_style=count -p no:sugar tests pytest --timeout=9 --durations=10 -n 2 --dist loadfile --cov homeassistant --cov-report html -qq -o console_output_style=count -p no:sugar tests
codecov --token $(codecovToken) codecov --token $(codecovToken)
script/check_dirty script/check_dirty
displayName: 'Run pytest for python $(python.container) / coverage' displayName: 'Run pytest for python $(python.container) / coverage'

View file

@ -169,11 +169,6 @@ async def mock_ddp_response(hass, mock_status_data, games=None):
await hass.async_block_till_done() await hass.async_block_till_done()
async def test_async_setup_platform_does_nothing():
"""Test setup platform does nothing (Uses config entries only)."""
await ps4.media_player.async_setup_platform(None, None, None)
async def test_media_player_is_setup_correctly_with_entry(hass): async def test_media_player_is_setup_correctly_with_entry(hass):
"""Test entity is setup correctly with entry correctly.""" """Test entity is setup correctly with entry correctly."""
mock_entity_id = await setup_mock_component(hass) mock_entity_id = await setup_mock_component(hass)