Skip to content

Comments

fix(tests): add missing main block to test_session.py#54426

Closed
machov wants to merge 1 commit intoapache:masterfrom
machov:fix/spark-54405-test-session-main-block
Closed

fix(tests): add missing main block to test_session.py#54426
machov wants to merge 1 commit intoapache:masterfrom
machov:fix/spark-54405-test-session-main-block

Conversation

@machov
Copy link

@machov machov commented Feb 23, 2026

Fixes #54405

The test_session.py file was missing the if __name__ == '__main__' block that allows it to be executed directly and included in CI runs. This follows the pattern established in other test files throughout the codebase.

This simple addition resolves the issue where these tests were not being executed in CI, ensuring better test coverage going forward.

Changes:

  • Added standard main block to python/pyspark/sql/tests/connect/test_session.py
  • Follows the same pattern used in other test files (imports main from pyspark.testing)

Testing:
The file can now be executed directly with python test_session.py.

Fixes apache#54405

The test_session.py file was missing the main block that allows it to be
executed directly and included in CI runs. This follows the pattern
established in other test files and resolves the issue where tests
were not being executed.
@gaogaotiantian
Copy link
Contributor

The problem is not that this test does not run - it's that the test fails. I skipped working on this because I'm not sure what the original author tries to validate. I already reached out to the original author of the test and hopefully he can fix the test itself.

@machov machov closed this Feb 25, 2026
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.

[TEST] test_session.py does not work properly

2 participants