Skip to content

Conversation

@gaogaotiantian
Copy link
Contributor

What changes were proposed in this pull request?

Allow run-tests to take unittest style string like test_module.TestClass.test_case, in addition to test_module TestClass.test_case.

Also some extra check is added for the existence of the test module - we are not sending it to bin/pyspark if we can't find the module.

Why are the changes needed?

It's extra work to split the string when copy/paste directly from unittest output (CI failures for example).

Does this PR introduce any user-facing change?

No

How was this patch tested?

Manually confirmed the . connection works and the original way is not impacted (except that we have some new checks for the module).

Was this patch authored or co-authored using generative AI tooling?

No.

return python_execs


def split_and_validate_testnames(testnames):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is nice. Can we show the full example of this, and fix the docs in https://spark.apache.org/docs/latest/api/python/development/testing.html#testing-pyspark as well?

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants