From 7f7dd99c0837ad0c60a01a46c4f471ef463788c2 Mon Sep 17 00:00:00 2001 From: Bugale Bugalit Date: Sun, 1 Sep 2024 23:44:35 +0300 Subject: [PATCH] fix: ignore torch warning --- tests/test_buganime.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test_buganime.py b/tests/test_buganime.py index 355a2be..0d74f1e 100644 --- a/tests/test_buganime.py +++ b/tests/test_buganime.py @@ -131,7 +131,8 @@ def test_transcode(filename: str, fps: str, check_func: typing.Callable[[typing. with tempfile.TemporaryDirectory() as tempdir: buganime.OUTPUT_DIR = tempdir output_path = os.path.join(tempdir, 'Movies', filename) - buganime.process_file(os.path.join(os.path.dirname(__file__), 'data', filename)) + with pytest.warns(FutureWarning, match="You are using `torch.load`"): + buganime.process_file(os.path.join(os.path.dirname(__file__), 'data', filename)) assert os.path.isfile(output_path) stream = json.loads(subprocess.run(['ffprobe', '-show_format', '-show_streams', '-of', 'json', output_path], text=True, capture_output=True, check=True, encoding='utf-8').stdout)['streams'][0]