diff --git a/test/test_encoders.py b/test/test_encoders.py index 5e98ff4f1..bf5f9cc6b 100644 --- a/test/test_encoders.py +++ b/test/test_encoders.py @@ -56,9 +56,11 @@ def test_bad_input(self): encoder.to_tensor(format=bad_format) @pytest.mark.parametrize("method", ("to_file", "to_tensor")) - def test_bad_input_parametrized(self, method): + def test_bad_input_parametrized(self, method, tmp_path): valid_params = ( - dict(dest="output.mp3") if method == "to_file" else dict(format="mp3") + dict(dest=str(tmp_path / "output.mp3")) + if method == "to_file" + else dict(format="mp3") ) decoder = AudioEncoder(self.decode(NASA_AUDIO_MP3), sample_rate=10)