Skip to content

Commit

Permalink
test: switch from nose2 to pytest
Browse files Browse the repository at this point in the history
  • Loading branch information
eginhard committed Dec 12, 2024
1 parent cd52907 commit a6e77e0
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 19 deletions.
32 changes: 14 additions & 18 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,48 +6,44 @@ help:

target_dirs := tests TTS notebooks recipes

test_all: ## run tests and don't stop on an error.
nose2 --with-coverage --coverage TTS tests
./run_bash_tests.sh

test: ## run tests.
coverage run -m nose2 -F -v -B tests
coverage run -m pytest -x -v tests

test_vocoder: ## run vocoder tests.
coverage run -m nose2 -F -v -B tests.vocoder_tests
coverage run -m pytest -x -v tests/vocoder_tests

test_tts: ## run tts tests.
coverage run -m nose2 -F -v -B tests.tts_tests
coverage run -m pytest -x -v tests/tts_tests

test_tts2: ## run tts tests.
coverage run -m nose2 -F -v -B tests.tts_tests2
coverage run -m pytest -x -v tests/tts_tests2

test_xtts:
coverage run -m nose2 -F -v -B tests.xtts_tests
coverage run -m pytest -x -v tests/xtts_tests

test_aux: ## run aux tests.
coverage run -m nose2 -F -v -B tests.aux_tests
coverage run -m pytest -x -v tests/aux_tests
./run_bash_tests.sh

test_zoo0: ## run zoo tests.
coverage run -m nose2 -F -v -B tests.zoo_tests.test_models.test_models_offset_0_step_3 \
tests.zoo_tests.test_models.test_voice_conversion
coverage run -m pytest -x -v tests/zoo_tests/test_models.py \
-k "test_models_offset_0_step_3 or test_voice_conversion" \
test_zoo1: ## run zoo tests.
coverage run -m nose2 -F -v -B tests.zoo_tests.test_models.test_models_offset_1_step_3
coverage run -m pytest -x -v tests/zoo_tests/test_models.py -k test_models_offset_1_step_3
test_zoo2: ## run zoo tests.
coverage run -m nose2 -F -v -B tests.zoo_tests.test_models.test_models_offset_2_step_3
coverage run -m pytest -x -v tests/zoo_tests/test_models.py -k test_models_offset_2_step_3

inference_tests: ## run inference tests.
coverage run -m nose2 -F -v -B tests.inference_tests
coverage run -m pytest -x -v tests/inference_tests

data_tests: ## run data tests.
coverage run -m nose2 -F -v -B tests.data_tests
coverage run -m pytest -x -v tests/data_tests

test_text: ## run text tests.
coverage run -m nose2 -F -v -B tests.text_tests
coverage run -m pytest -x -v tests/text_tests

test_failed: ## only run tests failed the last time.
coverage run -m nose2 -F -v -B tests
coverage run -m pytest --last-failed -v tests

style: ## update code style.
uv run --only-dev black ${target_dirs}
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,8 @@ all = [
dev = [
"black==24.2.0",
"coverage[toml]>=7",
"nose2>=0.15",
"pre-commit>=3",
"pytest>=8",
"ruff==0.7.0",
]
# Dependencies for building the documentation
Expand Down

0 comments on commit a6e77e0

Please sign in to comment.