No package symbol
no_package_symbol
Dual-criterion rule for integration / e2e tests.
Every test under tests/integration/ or tests/e2e/ must either
- exercise a first-party Python symbol (criterion a), or
- invoke a declared
[project.scripts]entrypoint (criterion b).
A test in tests/e2e/ that exercises only Python symbols is
mis-located (its real boundary is integration); a test that satisfies
neither criterion is not exercising the package at all. Both shapes are
reported with a verdict that drives a concrete fix-hint.
The rule mirrors :class:PrivateImportsRule structurally
(rule_id / check / _scan_file / _build_check_result)
but delegates the AST primitives to _shared so that
pyramid_level and no_package_symbol consume the same
first-party-symbol / in-package-script helpers.
NoPackageSymbolRule
Bases: ProjectRule
Flag integration / e2e tests that exercise neither symbol nor CLI.
Source code in packages/axm-audit/src/axm_audit/core/rules/test_quality/no_package_symbol.py
| Python | |
|---|---|
167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 | |
rule_id
property
Stable identifier for this rule.
check(project_path)
Scan integration/e2e tests for missing package exercise.