mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-03-01 05:01:45 +01:00
fix: update test to expect ScanInProgressError when marking missing during active scan
Some checks failed
Python Linting / Run Ruff (push) Has been cancelled
Python Linting / Run Pylint (push) Has been cancelled
Build package / Build Test (3.10) (push) Has been cancelled
Build package / Build Test (3.11) (push) Has been cancelled
Build package / Build Test (3.12) (push) Has been cancelled
Build package / Build Test (3.13) (push) Has been cancelled
Build package / Build Test (3.14) (push) Has been cancelled
Some checks failed
Python Linting / Run Ruff (push) Has been cancelled
Python Linting / Run Pylint (push) Has been cancelled
Build package / Build Test (3.10) (push) Has been cancelled
Build package / Build Test (3.11) (push) Has been cancelled
Build package / Build Test (3.12) (push) Has been cancelled
Build package / Build Test (3.13) (push) Has been cancelled
Build package / Build Test (3.14) (push) Has been cancelled
Amp-Thread-ID: https://ampcode.com/threads/T-019c92af-47c7-7448-b111-4ebfbf5585e6 Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
parent
6c1bbbcf16
commit
c093e5544c
@ -5,7 +5,7 @@ from unittest.mock import patch
|
||||
|
||||
import pytest
|
||||
|
||||
from app.assets.seeder import AssetSeeder, Progress, ScanPhase, State
|
||||
from app.assets.seeder import AssetSeeder, Progress, ScanInProgressError, ScanPhase, State
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
@ -410,7 +410,7 @@ class TestSeederMarkMissing:
|
||||
assert result == 5
|
||||
mock_mark.assert_called_once_with(["/models", "/input", "/output"])
|
||||
|
||||
def test_mark_missing_returns_zero_when_running(
|
||||
def test_mark_missing_raises_when_running(
|
||||
self, fresh_seeder: AssetSeeder, mock_dependencies
|
||||
):
|
||||
barrier = threading.Event()
|
||||
@ -427,8 +427,8 @@ class TestSeederMarkMissing:
|
||||
fresh_seeder.start(roots=("models",))
|
||||
assert reached.wait(timeout=2.0)
|
||||
|
||||
result = fresh_seeder.mark_missing_outside_prefixes()
|
||||
assert result == 0
|
||||
with pytest.raises(ScanInProgressError):
|
||||
fresh_seeder.mark_missing_outside_prefixes()
|
||||
|
||||
barrier.set()
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user