style: 代码格式化

This commit is contained in:
2025-12-13 21:47:37 +08:00
parent a0b327cdbb
commit baa7ac8ee9
64 changed files with 755 additions and 573 deletions

View File

@@ -1,6 +1,7 @@
"""
Working unit tests for particle modules based on actual module structure.
"""
import pytest
from src.heurams.kernel.particles.atom import Atom
@@ -14,10 +15,7 @@ class TestNucleon:
def test_nucleon_creation(self):
"""Test basic Nucleon creation."""
payload = {
"content": "Test content",
"answer": "Test answer"
}
payload = {"content": "Test content", "answer": "Test answer"}
nucleon = Nucleon("test_id", payload)
assert nucleon.ident == "test_id"
@@ -123,7 +121,10 @@ class TestOrbital:
quick_view=[["cloze", 1], ["mcq", 0.5]],
recognition=[["recognition", 1]],
final_review=[["cloze", 0.7], ["mcq", 0.7]],
puzzle_config={"cloze": {"from": "content"}, "mcq": {"from": "keyword_note"}}
puzzle_config={
"cloze": {"from": "content"},
"mcq": {"from": "keyword_note"},
},
)
assert isinstance(orbital, dict)
@@ -138,7 +139,7 @@ class TestOrbital:
quick_view=[["cloze", 1], ["mcq", 0.5]],
recognition=[],
final_review=[],
puzzle_config={}
puzzle_config={},
)
assert len(orbital["quick_view"]) == 2
@@ -191,4 +192,4 @@ class TestAtom:
assert isinstance(placeholder, tuple)
assert len(placeholder) == 3
assert isinstance(placeholder[0], Electron)
assert isinstance(placeholder[1], Nucleon)
assert isinstance(placeholder[1], Nucleon)