Add some property tests for scanning
This commit is contained in:
parent
b26dda60a4
commit
504a47cbf8
1 changed files with 7 additions and 1 deletions
|
|
@ -211,13 +211,19 @@ def test_inaccessible_scan_methods(smart_scan_thing):
|
||||||
"""Test that method with @_scan_running decorator is inaccessible.
|
"""Test that method with @_scan_running decorator is inaccessible.
|
||||||
|
|
||||||
The @_scan_running decorator makes these functions inaccessible unless
|
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):
|
with pytest.raises(ScanNotRunningError):
|
||||||
smart_scan_thing._run_scan()
|
smart_scan_thing._run_scan()
|
||||||
with pytest.raises(ScanNotRunningError):
|
with pytest.raises(ScanNotRunningError):
|
||||||
smart_scan_thing._manage_stitching_threads()
|
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):
|
def test_private_delete_scan(smart_scan_thing, caplog):
|
||||||
"""Test the private _delete_scan method deletes directories or warns if it can't."""
|
"""Test the private _delete_scan method deletes directories or warns if it can't."""
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue