Expand description
Discovery helpers for gdtest.
Two layers:
resolveturns user-supplied paths (files, directories,res://…) into a flat list ofres://…paths, filtered by discovery include/exclude globs.list_tests_inparses one GDScript file with gdsyntax and returns everyfunc test_*()name in source order.
Default patterns:
test/**/*.gd— any.gdfile inside atest/directory tree**/*.test.gd— co-located test files anywhere in the project
Users can override via gdtest.toml: include = ["test/**/*.gd", "**/*.test.gd"]
Target: discovering 500 tests across 50 files in <100 ms on a warm cache .
Re-exports§
pub use gdunit4_migrate::GdUnit4MigrationAction;pub use gdunit4_migrate::GdUnit4MigrationIssue;pub use gdunit4_migrate::GdUnit4MigrationOutput;pub use gdunit4_migrate::GdUnit4MigrationStatus;pub use gdunit4_migrate::is_gdunit4_test_file;pub use gdunit4_migrate::is_gdunit4_test_source;pub use gdunit4_migrate::migrate_gdunit4_file;pub use gdunit4_migrate::migrate_gdunit4_source;pub use gut_migrate::GutMigrationAction;pub use gut_migrate::GutMigrationIssue;pub use gut_migrate::GutMigrationOutput;pub use gut_migrate::GutMigrationStatus;pub use gut_migrate::is_gut_test_file;pub use gut_migrate::is_gut_test_source;pub use gut_migrate::migrate_gut_file;pub use gut_migrate::migrate_gut_source;pub use rewrite::RewriteOutput;pub use rewrite::rewrite_file;pub use rewrite::rewrite_source;
Modules§
- coverage
- GDScript coverage instrumentation.
- deps
- GDScript dependency graph for test impact analysis.
- gdunit4_
migrate - gut_
migrate - mutate
- GDScript mutation testing operators.
- rewrite
- GDScript assert rewriter: preprocessing for pytest-style rich diffs.
Structs§
- Test
Entry - A discovered test function with its run classification.
Enums§
- Isolation
Directive - Per-test isolation override discovered from source comments.
- Test
Kind - Classification of a discovered test function.
Constants§
- DEFAULT_
PATTERNS - Default discovery globs used when no
includekey is ingdtest.toml.
Functions§
- extract_
describe_ dir - If
pathcontains a component nameddescribe_<Name>, return that component name. Used to prefix test function names for directory-based sub-suites. - glob_
match - Match a relative path (forward-slash separated) against a simple glob pattern.
Supports
**(zero or more path segments) and*(any chars within one segment). - list_
test_ entries_ in - Return every
func test_*()andfunc bench_*()in the given GDScript file, in source order. - list_
test_ entries_ in_ source - list_
tests_ in - Convenience wrapper: returns the names of tests that would actually run
(excludes
bench_*). - res_
to_ abs - Translate a res:// path to its on-disk absolute form.
- resolve
- Normalise every input path into a list of
res://…test-file paths. - to_
res_ path - Translate an absolute on-disk path to the res:// form used by the
worker. Caller guarantees
fileis insideproject_abs.