Skip to content

Commit 617beef

Browse files
committed
fix(test): address remaining review feedback
Set generated parameterized test-class metadata to the exported module name, thread repformer_set_davg_zero through DPA2 curated cases, and update the SeA stats coverage comment to match the curated variants. Authored by OpenClaw (model: gpt-5.4)
1 parent a1ca1ff commit 617beef

3 files changed

Lines changed: 8 additions & 3 deletions

File tree

source/tests/consistent/common.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -701,6 +701,10 @@ class TestClass(base_class):
701701
name = f"{base_name}_{suffix}"
702702
suffix += 1
703703

704+
TestClass.__name__ = name
705+
TestClass.__qualname__ = name
706+
TestClass.__module__ = base_class.__module__
707+
704708
used_names.add(name)
705709
class_module[name] = TestClass
706710
# make unittest module happy by ignoring the original one

source/tests/consistent/descriptor/test_dpa2.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ def data(self) -> dict:
243243
"update_style": repformer_update_style,
244244
"update_residual": 0.001,
245245
"update_residual_init": repformer_update_residual_init,
246-
"set_davg_zero": True,
246+
"set_davg_zero": repformer_set_davg_zero,
247247
"trainable_ln": repformer_trainable_ln,
248248
"ln_eps": repformer_ln_eps,
249249
"use_sqrt_nnei": repformer_use_sqrt_nnei,
@@ -712,7 +712,7 @@ def data(self) -> dict:
712712
"update_style": repformer_update_style,
713713
"update_residual": 0.001,
714714
"update_residual_init": repformer_update_residual_init,
715-
"set_davg_zero": True,
715+
"set_davg_zero": repformer_set_davg_zero,
716716
"trainable_ln": repformer_trainable_ln,
717717
"ln_eps": repformer_ln_eps,
718718
"use_sqrt_nnei": repformer_use_sqrt_nnei,

source/tests/consistent/descriptor/test_se_e2_a.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,8 @@ def atol(self) -> float:
380380

381381

382382
SE_A_STAT_CASES = (
383-
# Statistics path only exercises the float64 baseline with env-protection variants.
383+
# Statistics path exercises the float64 baseline, a type_one_side=False
384+
# variant, and env-protection variants.
384385
se_a_case(),
385386
se_a_case(type_one_side=False),
386387
se_a_case(env_protection=1e-8),

0 commit comments

Comments
 (0)