Commit baab3e8
authored
test(consistent): replace Cartesian product with curated matrices for descriptor tests (#5378)
Problem
- Several descriptor consistency suites use full Cartesian products over
many feature toggles.
- That creates large default PR-CI matrices whose cost is dominated by
combinatorial expansion rather than a few isolated slow cases.
- In this group alone, the main suite case counts go from 48 -> 7 for
`test_se_e2_a.py`, 64 -> 9 for `test_dpa1.py`, and 512 -> 12 for
`test_dpa2.py`.
Change
- Add `parameterized_cases(*cases)` in
`source/tests/consistent/common.py` for explicit curated matrices
without changing existing `parameterized(*attrs)` semantics.
- Replace Cartesian-product decorators with curated case lists in:
- `source/tests/consistent/descriptor/test_se_e2_a.py`
- `source/tests/consistent/descriptor/test_dpa1.py`
- `source/tests/consistent/descriptor/test_dpa2.py`
- Reuse the same curated matrices for descriptor API tests where
applicable.
- Keep existing skip logic unchanged; only the default generated case
sets are reduced.
Validation
- `python -m pytest --collect-only
source/tests/consistent/descriptor/test_se_e2_a.py
source/tests/consistent/descriptor/test_dpa1.py
source/tests/consistent/descriptor/test_dpa2.py`
- collected 488 tests after the reduction
- `python -m pytest source/tests/consistent/descriptor/test_se_e2_a.py
source/tests/consistent/descriptor/test_dpa1.py
source/tests/consistent/descriptor/test_dpa2.py -q`
- `91 passed, 397 skipped`
- `python3 -m py_compile` on the touched files
Related
- Closes #5372
Authored by OpenClaw (model: gpt-5.4)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **New Features**
* Added a decorator to specify explicit test cases (no Cartesian-product
expansion).
* **Tests**
* Refactored multiple test suites to use curated, explicit case sets for
clearer, deterministic parametrization.
* Added reusable case-construction helpers and baseline/curated case
collections to simplify test definitions.
* Improved deterministic test-class naming with robust sanitization and
uniqueness handling.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->1 parent 67a30f2 commit baab3e8
File tree
4 files changed
+306
-132
lines changed- source/tests/consistent
- descriptor
4 files changed
+306
-132
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
75 | 76 | | |
76 | 77 | | |
77 | 78 | | |
78 | | - | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
79 | 82 | | |
80 | 83 | | |
81 | 84 | | |
| |||
670 | 673 | | |
671 | 674 | | |
672 | 675 | | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
673 | 716 | | |
674 | 717 | | |
675 | 718 | | |
| |||
733 | 776 | | |
734 | 777 | | |
735 | 778 | | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
736 | 800 | | |
737 | 801 | | |
738 | 802 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
60 | 82 | | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
81 | 126 | | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
82 | 130 | | |
83 | 131 | | |
84 | 132 | | |
| |||
556 | 604 | | |
557 | 605 | | |
558 | 606 | | |
559 | | - | |
560 | | - | |
561 | | - | |
562 | | - | |
563 | | - | |
564 | | - | |
565 | | - | |
566 | | - | |
567 | | - | |
568 | | - | |
569 | | - | |
570 | | - | |
571 | | - | |
572 | | - | |
573 | | - | |
574 | | - | |
575 | | - | |
576 | | - | |
577 | | - | |
578 | | - | |
579 | | - | |
| 607 | + | |
580 | 608 | | |
581 | 609 | | |
582 | 610 | | |
| |||
0 commit comments