Skip to content

Run focused tests for changed Python files - #1282

Draft
forest-savage1234 wants to merge 1 commit into
log2timeline:mainfrom
forest-savage1234:feat/focused-tests-1019
Draft

Run focused tests for changed Python files#1282
forest-savage1234 wants to merge 1 commit into
log2timeline:mainfrom
forest-savage1234:feat/focused-tests-1019

Conversation

@forest-savage1234

@forest-savage1234 forest-savage1234 commented Aug 31, 2026

Copy link
Copy Markdown

Summary

  • Map changed source modules for the detected project to their corresponding unittest modules and run changed tests directly.
  • Run the full suite for configuration, shared, or unmapped Python changes; skip Python tests for documentation-only diffs.
  • Make --all-files select the full suite for tests as well as linting.
  • Pass subprocess arguments as a list without invoking a shell, and resolve candidate tests relative to --project-path.

Closes #1019

Validation

  • ReviewHelperTest — 2 test methods passed, covering the native l2tdevtools mapping, a cross-project dfvfs mapping, documentation-only changes, configuration changes, and --all-files.
  • Black left all three touched files unchanged.
  • git diff --check.

Scope notes

Unknown or shared Python changes deliberately fall back to the full suite rather than risking an incomplete focused run. The source-prefix mapping uses the project name detected by ProjectHelper, so the helper remains usable across the supported log2timeline/ForensicArtifacts repositories.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

review script: only run tests for changed files

1 participant