nchammas commented on code in PR #59250:
URL: https://github.com/apache/spark/pull/59250#discussion_r4437497618


##########
dev/sparktestsupport/utils.py:
##########
@@ -154,6 +156,27 @@ def determine_modules_to_test(changed_modules, 
deduplicated=True):
     )
 
 
+def determine_shell_script_test_goals(
+    test_modules: Sequence[modules.Module], stage: modules.TestStage
+) -> tuple[modules.ShellScriptTestGoal, ...]:
+    """
+    Return the shell script test goals that the given modules declare for a 
stage.
+
+    Goals are returned in the order determined by the modules passed in,
+    preserving each module's declaration order. Each goal is returned only 
once:
+
+    >>> from pathlib import Path
+    >>> goals = determine_shell_script_test_goals(
+    ...     [modules.build, modules.root], modules.TestStage.PRE_BUILD)
+    >>> [g.path for g in goals].count(Path("dev/test-dependencies.sh"))

Review Comment:
   I updated the doctests here, but in a future PR I strongly believe we should 
add proper test files for our critical dev tooling and move a bunch of test 
code out of the doctests and into the separate test files.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to