fix: test

This commit is contained in:
Lukas 2025-11-14 10:52:23 +01:00
parent 4c7657ce75
commit 8ae8b0cdfb

View File

@ -15,7 +15,7 @@ from unittest.mock import Mock, patch
import pytest import pytest
from src.core.SeriesApp import OperationResult, OperationStatus, ProgressInfo, SeriesApp from src.core.SeriesApp import SeriesApp
class TestSeriesAppInitialization: class TestSeriesAppInitialization:
@ -451,53 +451,3 @@ class TestSeriesAppGetters:
operation = app.get_current_operation() operation = app.get_current_operation()
assert operation == "test_op" assert operation == "test_op"
class TestProgressInfo:
"""Test ProgressInfo dataclass."""
def test_progress_info_creation(self):
"""Test creating ProgressInfo."""
info = ProgressInfo(
current=5,
total=10,
message="Processing...",
percentage=50.0,
status=OperationStatus.RUNNING
)
assert info.current == 5
assert info.total == 10
assert info.message == "Processing..."
assert info.percentage == 50.0
assert info.status == OperationStatus.RUNNING
class TestOperationResult:
"""Test OperationResult dataclass."""
def test_operation_result_success(self):
"""Test creating successful OperationResult."""
result = OperationResult(
success=True,
message="Operation completed",
data={"key": "value"}
)
assert result.success is True
assert result.message == "Operation completed"
assert result.data == {"key": "value"}
assert result.error is None
def test_operation_result_failure(self):
"""Test creating failed OperationResult."""
error = RuntimeError("Test error")
result = OperationResult(
success=False,
message="Operation failed",
error=error
)
assert result.success is False
assert result.message == "Operation failed"
assert result.error == error
assert result.data is None