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."""