Expand description
Which test files a run actually collected: a test that never ran is evidence of nothing.
Pure: the runtime reads manifests and configuration, runs listings, and hands their facts here. Per toolchain this module knows the static collection rule (what proves a file is not collected), how a test id in a JUnit report or a listing maps back to a file, the markers that make a file define tests, and the one-sentence rule and fixes a person and the retry read.
Structs§
- Collection
- The attempt’s changed test files and whether the run collected them.
- Collection
Rule - A runner’s collection rule: one sentence a person reads, and where it came from.
- File
Collection - One judged test file.
- JsRule
- A JS runner’s include rule, when it is known statically.
- Listing
Run - A listing speccoder ran because the earlier sources left a file undecided.
- ModDecl
- A
moddeclaration found in a source file. - Pytest
Rule - pytest’s collection settings, as configured or by default.
- Rust
Package - One Cargo package, as its manifest says.
- Rust
Target - A compiled test binary and its crate root.
Enums§
- Decided
By - What decided a file’s state.
- File
State - Whether the run collected a test from a file.
- JsRunner
- The JS runners.
- Toolchain
- A test toolchain speccoder knows how to ask.
Constants§
- COMPILED_
OUT - The reason for a file reachable by the rule whose tests did not run.
- GO_RULE
- The Go rule sentence.
- REASON_
PREFIX - The prefix of every verdict reason a never-run file gives.
- RUST_
RULE - The Rust rule sentence.
Functions§
- collected
- A decided file, built from parts.
- declared_
tests - How many tests
sourcedeclares by the toolchain’s markers (a lower bound for what a run of it must collect). - defines_
tests - Whether
sourcedefines at least one test by the toolchain’s markers: a helper without test definitions is never judged. - glob_
match - Whether
pathmatches a glob:**,*,?,[…],{a,b}and the extglobs?(…),@(…),+(…),*(…)(vitest and jest defaults use them). - go_
breaks - Why a Go test file is never run by the static rule, if it is not, with
the fixes.
tags: the build tags the check sets. - go_
build_ constraint - The file’s
//go:buildexpression, when it has one. - go_
build_ satisfied - Evaluates a
//go:buildexpression withtagsset (plus the OS, architecture,unixand release tagsgo1.N, which are always on). - go_
declared_ tests - The test functions
go testruns from a file:Test,Example,Fuzzfollowed by end or a non-lowercase character. - go_
id_ matches - A Go test id’s match: JUnit
importpath::TestXor a listing name, for a file whose package isimport_pathand that declaresnames. - go_rule
- The Go rule.
- is_
build_ or_ dependency - Directories nothing judges: build output and dependencies.
- join
- Joins
dirandreland normalises./..;Nonewhen the result leaves the workspace root. - match_
name - fnmatch over one path segment:
*,?,[…]. - not_
collected - A file no test ran from.
- python_
id_ matches - A pytest id’s file:
tests/test_x.py::test_a(listing) or the JUnitclassname::nameformtests.test_x::test_a/tests.test_x.TestC::t. - reason
tests not collected: `<path>` — <rule>; <why>.- retry_
line `<path>` never ran: <short rule>. <Fixes>.— the retry digest’s line.- rust_
fixes - The ways out for an unreachable Rust file.
- rust_
mod_ decls - The
moddeclarations of a Rust source file (comments ignored), file modules (mod x;) only, each with the inline modules around it. - rust_
reachable - Where each file reachable from
targetssits: the targets’ binary ids with the file’s module path (""for a crate root).readgives a file’s text (workspace-relative path); a file it cannot read ends the walk there.#[path]is followed; a path leaving the root is ignored. - rust_
rule - The Rust rule as configured:
autotests = falseleaves only[[test]]targets. - rust_
targets - The test-carrying targets of
pkg, from its manifest and the files present (files: workspace-relative paths). - rust_
tests_ by_ file - Which file each test id belongs to: the longest binary id that prefixes
it, then the longest module path of a file of that binary.
files: path → (binary id, module path) asrust_reachablegives them. - strip_
comments - Strips
//and/* */comments, keeping line breaks (strings are left as they are: a comment marker inside one is rare and only hides text). - toolchain_
of - The toolchain a file’s extension belongs to.
- unknown
- A file speccoder cannot tell about.