Skip to content

Conversation

copybara-service[bot]
Copy link

Port tests away from setUpClass and setUpModule to setUp alone.

This change prepares for upcoming changes in which we run tests in parallel using threads, which we are doing partially to test free threading but also partially to speed up TPU tests via thread-parallelism.

If independent tests run in parallel in no particular order, there's no natural scope around which to call setUpClass or SetUpModule. But for JAX tests this never seems necessary: we can just do the same work in setUp() or do it globally.

@copybara-service copybara-service bot force-pushed the test_713088597 branch 3 times, most recently from d0f1c6b to e2c3b3c Compare January 8, 2025 16:02
This change prepares for upcoming changes in which we run tests in parallel using threads, which we are doing partially to test free threading but also partially to speed up TPU tests via thread-parallelism.

If independent tests run in parallel in no particular order, there's no natural scope around which to call setUpClass or SetUpModule. But for JAX tests this never seems necessary: we can just do the same work in setUp() or do it globally.

PiperOrigin-RevId: 713296722
@copybara-service copybara-service bot merged commit 3fa5572 into main Jan 8, 2025
@copybara-service copybara-service bot deleted the test_713088597 branch January 8, 2025 16:14
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.

1 participant