From e912ae0fcecb26f5751d0c47511ea10ddd8260dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Voituret?= Date: Fri, 8 Nov 2019 20:21:37 -0500 Subject: [PATCH] fix: use xdist testing --- .circleci/config.yml | 8 ++++---- tests/test_separator.py | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index d20f72a..5e7368a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -16,10 +16,10 @@ jobs: command: apt-get update && apt-get install -y ffmpeg - run: name: install python dependencies - command: pip install -r requirements.txt && pip install pytest + command: pip install -r requirements.txt && pip install pytest pytest-xdist - run: name: pytest - command: pytest -W ignore::FutureWarning -W ignore::DeprecationWarning -vv + command: pytest -W ignore::FutureWarning -W ignore::DeprecationWarning -vv --forked - save_cache: key: models-{{ checksum "spleeter/model/__init__.py" }} paths: @@ -40,10 +40,10 @@ jobs: command: apt-get update && apt-get install -y ffmpeg - run: name: install python dependencies - command: pip install -r requirements.txt && pip install pytest + command: pip install -r requirements.txt && pip install pytest pytest-xdist - run: name: pytest - command: pytest -W ignore::FutureWarning -W ignore::DeprecationWarning -vv + command: pytest -W ignore::FutureWarning -W ignore::DeprecationWarning -vv --forked - save_cache: key: models-{{ checksum "spleeter/model/__init__.py" }} paths: diff --git a/tests/test_separator.py b/tests/test_separator.py index 5358d06..54c9c18 100644 --- a/tests/test_separator.py +++ b/tests/test_separator.py @@ -30,7 +30,7 @@ def test_separate(configuration, instruments): waveform, _ = adapter.load(TEST_AUDIO_DESCRIPTOR) separator = Separator(configuration) prediction = separator.separate(waveform) - assert len(prediction) == 2 + assert len(prediction) == len(instruments) for instrument in instruments: assert instrument in prediction