fix(gui): Resolve ImGui stack corruption, JSON serialization errors, and test regressions
This commit is contained in:
@@ -7,6 +7,7 @@ def test_file_item_fields():
|
||||
assert item.path == "src/models.py"
|
||||
assert item.auto_aggregate is True
|
||||
assert item.force_full is False
|
||||
assert item.injected_at is None
|
||||
|
||||
def test_file_item_to_dict():
|
||||
"""Test that FileItem can be serialized to a dict."""
|
||||
@@ -14,7 +15,8 @@ def test_file_item_to_dict():
|
||||
expected = {
|
||||
"path": "test.py",
|
||||
"auto_aggregate": False,
|
||||
"force_full": True
|
||||
"force_full": True,
|
||||
"injected_at": None
|
||||
}
|
||||
assert item.to_dict() == expected
|
||||
|
||||
@@ -23,12 +25,14 @@ def test_file_item_from_dict():
|
||||
data = {
|
||||
"path": "test.py",
|
||||
"auto_aggregate": False,
|
||||
"force_full": True
|
||||
"force_full": True,
|
||||
"injected_at": 123.456
|
||||
}
|
||||
item = FileItem.from_dict(data)
|
||||
assert item.path == "test.py"
|
||||
assert item.auto_aggregate is False
|
||||
assert item.force_full is True
|
||||
assert item.injected_at == 123.456
|
||||
|
||||
def test_file_item_from_dict_defaults():
|
||||
"""Test that FileItem.from_dict handles missing fields."""
|
||||
@@ -37,3 +41,4 @@ def test_file_item_from_dict_defaults():
|
||||
assert item.path == "test.py"
|
||||
assert item.auto_aggregate is True
|
||||
assert item.force_full is False
|
||||
assert item.injected_at is None
|
||||
|
||||
Reference in New Issue
Block a user