Fix tempfile test isolation for Python 3.13 + CodSpeed benchmark instrumentation#370
Draft
Fix tempfile test isolation for Python 3.13 + CodSpeed benchmark instrumentation#370
Conversation
Copilot
AI
changed the title
[WIP] Fix Benchmark CI issue in dependency update PR
Fix tempfile test isolation for Python 3.13 + CodSpeed benchmark instrumentation
Feb 9, 2026
Bumps [CodSpeedHQ/action](https://github.com/codspeedhq/action) from 4.10.2 to 4.10.5. - [Release notes](https://github.com/codspeedhq/action/releases) - [Changelog](https://github.com/CodSpeedHQ/action/blob/main/CHANGELOG.md) - [Commits](CodSpeedHQ/action@2084259...9a74b6b) --- updated-dependencies: - dependency-name: CodSpeedHQ/action dependency-version: 4.10.5 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]>
ce0ec77 to
bc6cffc
Compare
Co-authored-by: shenxianpeng <[email protected]>
Explicitly close temp file before reading and restore sys.argv after test to ensure proper isolation in benchmark runs with CodSpeed. Co-authored-by: shenxianpeng <[email protected]>
Explicitly close temp files before reading and restore sys.argv after tests to ensure proper isolation across all tests using temp files. This prevents potential file descriptor issues in Python 3.13 with CodSpeed instrumentation. Co-authored-by: shenxianpeng <[email protected]>
023602d to
288168a
Compare
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dependabot/github_actions/CodSpeedHQ/action-4.10.5 #370 +/- ##
=====================================================================================
Coverage ? 94.65%
=====================================================================================
Files ? 9
Lines ? 805
Branches ? 0
=====================================================================================
Hits ? 762
Misses ? 43
Partials ? 0 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Base automatically changed from
dependabot/github_actions/CodSpeedHQ/action-4.10.5
to
main
February 14, 2026 22:55
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Benchmark CI failing on dependency update PR #369 due to
test_positional_arg_invalid_commitreturning exit code 0 instead of expected 1 when running with Python 3.13 and CodSpeed v4.10.5's memory profiling instrumentation.Changes
Test isolation improvements:
sys.argvafter each test (prevents state pollution across benchmark iterations)Before:
After:
Files Modified
.gitignore- Add.codspeed/to exclude benchmark artifactstests/main_test.py- Fix 6 tests:test_message_validation_from_file,test_main_with_message_file_argument, and all 4TestPositionalArgumentFeaturetests💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.