Skip to content

Fix progress_utils_test.py to restrict mocking of system-wide modules to the module under test.#465

Merged
copybara-service[bot] merged 1 commit into
mainfrom
test_893984286
Apr 7, 2026
Merged

Fix progress_utils_test.py to restrict mocking of system-wide modules to the module under test.#465
copybara-service[bot] merged 1 commit into
mainfrom
test_893984286

Conversation

@copybara-service
Copy link
Copy Markdown
Contributor

@copybara-service copybara-service Bot commented Apr 3, 2026

Fix progress_utils_test.py to restrict mocking of system-wide modules to the module under test.

This test was failing because sometimes other modules were calling time.time or tracemalloc.get_traced_memory, stealing the mocked return value.

Also add a warning that running with tracemalloc can significantly slow down the code.

@copybara-service copybara-service Bot force-pushed the test_893984286 branch 3 times, most recently from 2760319 to 3e66f1b Compare April 7, 2026 14:03
…es to the module under test.

This test was failing because sometimes other modules were calling `time.time` or `tracemalloc.get_traced_memory`, stealing the mocked return value.

Also add a warning that running with `tracemalloc` can significantly slow down the code.

PiperOrigin-RevId: 895884076
@copybara-service copybara-service Bot merged commit 38864d3 into main Apr 7, 2026
@copybara-service copybara-service Bot deleted the test_893984286 branch April 7, 2026 14: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