diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 759e330..6bd685d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -19,7 +19,7 @@ jobs: python-version: "3.10" cache: "pip" - - uses: awalsh128/cache-apt-pkgs-action@2c09a5e66da6c8016428a2172bd76e5e4f14bb17 # v1.5.3 + - uses: awalsh128/cache-apt-pkgs-action@acb598e5ddbc6f68a970c5da0688d2f3a9f04d05 # v1.6.0 with: packages: sox libsox-dev ffmpeg diff --git a/fs2/model.py b/fs2/model.py index 8902560..2f624e0 100644 --- a/fs2/model.py +++ b/fs2/model.py @@ -56,7 +56,7 @@ def __init__( logger.error(f"{pydantic_validation_error_shortener(e)}") raise TypeError( "Unable to load config. Possible causes: is it really a FastSpeech2Config? or the correct version?" - ) + ) from e if stats is not None and not isinstance(stats, Stats): stats = Stats(**stats) diff --git a/fs2/tests/test_cli.py b/fs2/tests/test_cli.py index 7c2eb64..9e82b3b 100644 --- a/fs2/tests/test_cli.py +++ b/fs2/tests/test_cli.py @@ -53,7 +53,7 @@ def test_help(self): def test_no_model(self): result = self.runner.invoke(app, ["synthesize"]) - self.assertIn("Missing argument 'MODEL_PATH'.", result.stdout) + self.assertIn("Missing argument 'MODEL_PATH'.", result.output) def test_filelist_and_text(self): with TemporaryDirectory() as tmpdir: @@ -76,7 +76,7 @@ def test_filelist_and_text(self): self.assertIn( "Got arguments for both text and a filelist - this will only process the text." " Please re-run without providing text if you want to run batch synthesis", - result.stdout, + result.output, ) def test_no_filelist_nor_text(self): @@ -91,7 +91,7 @@ def test_no_filelist_nor_text(self): str(model), ), ) - self.assertIn("You must define either --text or --filelist", result.stdout) + self.assertIn("You must define either --text or --filelist", result.output) def mock_synthesis(self, *_args, **_kwargs): print(_kwargs["model"].config)