From ccdd43081d8bed732af6a17d16f5ae2a77873752 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E5=AE=97=E5=B9=B3?= Date: Fri, 3 Jul 2026 11:53:02 +0000 Subject: [PATCH] test(real_bench): use 'swat' (guaranteed absent) for missing-data test The missing-data test assumed SMD was absent, but after downloading real SMD data for the cross-domain diagnostic it now loads successfully, so the test no longer exercised the FileNotFoundError path. Switch to 'swat' (another registered dataset whose files are absent) to keep the test valid regardless of which real datasets happen to be present locally. --- tests/test_real_bench.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/test_real_bench.py b/tests/test_real_bench.py index 43ea4e1..2b1f473 100644 --- a/tests/test_real_bench.py +++ b/tests/test_real_bench.py @@ -55,7 +55,8 @@ def test_load_windows_unknown_dataset_raises(): def test_load_windows_real_dataset_missing_data_raises_clear_error(): # Real loaders must raise a helpful error when the local data path is absent, - # rather than silently returning empty arrays. + # rather than silently returning empty arrays. Use a registered dataset name + # whose files are guaranteed absent (not 'smd', which may be present after + # the real-benchmark download step). with pytest.raises((FileNotFoundError, RuntimeError)): - # SMD is almost certainly not present in CI; should raise. - real_bench.load_windows("smd", T=64, stride=32) + real_bench.load_windows("swat", T=64, stride=32)