From 504a47cbf87267f14b61771df3ca83198f442f27 Mon Sep 17 00:00:00 2001 From: Julian Stirling Date: Sun, 18 Jan 2026 23:37:10 +0100 Subject: [PATCH] Add some property tests for scanning --- tests/unit_tests/test_smart_scan.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/unit_tests/test_smart_scan.py b/tests/unit_tests/test_smart_scan.py index 2b7243ab..a41d96d5 100644 --- a/tests/unit_tests/test_smart_scan.py +++ b/tests/unit_tests/test_smart_scan.py @@ -211,13 +211,19 @@ def test_inaccessible_scan_methods(smart_scan_thing): """Test that method with @_scan_running decorator is inaccessible. The @_scan_running decorator makes these functions inaccessible unless - a scan is running. + a scan is running. Also test properties that raise same error. """ with pytest.raises(ScanNotRunningError): smart_scan_thing._run_scan() with pytest.raises(ScanNotRunningError): smart_scan_thing._manage_stitching_threads() + # Properties + with pytest.raises(ScanNotRunningError): + smart_scan_thing.scan_data + with pytest.raises(ScanNotRunningError): + smart_scan_thing.ongoing_scan + def test_private_delete_scan(smart_scan_thing, caplog): """Test the private _delete_scan method deletes directories or warns if it can't."""