Tautology
tautology
Tautology rule — mechanical detection + delete-side triage.
Detects six tautology patterns in test bodies and classifies each finding
via :func:tautology_triage.triage. Verdicts land in
CheckResult.metadata["verdicts"] so downstream tooling can filter by
DELETE/STRENGTHEN/UNKNOWN.
Finding
dataclass
One tautology finding for a single test function.
Source code in packages/axm-audit/src/axm_audit/core/rules/test_quality/tautology.py
TautologyCheckResult
Bases: CheckResult
:class:CheckResult with metadata carrying the verdict list.
Source code in packages/axm-audit/src/axm_audit/core/rules/test_quality/tautology.py
| Python | |
|---|---|
TautologyRule
dataclass
Bases: ProjectRule
Detect tautological test assertions and triage each finding.
Source code in packages/axm-audit/src/axm_audit/core/rules/test_quality/tautology.py
| Python | |
|---|---|
807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 | |
rule_id
property
Stable identifier for this rule.
check(project_path)
Scan test files in project_path and return tautology verdicts.
Source code in packages/axm-audit/src/axm_audit/core/rules/test_quality/tautology.py
detect_tautologies(tree, *, path='')
Return :class:Finding entries for every tautological test in tree.