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.
This commit is contained in:
张宗平
2026-07-03 11:53:02 +00:00
parent 150e3bd9fd
commit ccdd43081d
+4 -3
View File
@@ -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)