test(question_gen): update __all__ assertion to include synthesizer exports

This commit is contained in:
2026-07-11 08:21:06 -04:00
parent a31b1fbf37
commit 6034d4172d
+9 -2
View File
@@ -35,6 +35,13 @@ class TestQuestionGenPublicAPI:
assert hasattr(mod, "stratified_sample") assert hasattr(mod, "stratified_sample")
def test_all_exports(self) -> None: def test_all_exports(self) -> None:
"""__all__ 包含预期的公开 API。""" """__all__ 包含预期的公开 APIloader + synthesizer"""
mod = importlib.import_module("app.question_gen") mod = importlib.import_module("app.question_gen")
assert set(mod.__all__) == {"load_benchmark", "stratified_sample"} assert set(mod.__all__) == {
"load_benchmark",
"stratified_sample",
"TASK_TYPE_LEVEL_MAP",
"AnchorContext",
"generate_one",
"sample_anchor",
}