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
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 | |
|---|---|
504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 | |
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.