Skip to content

Fix test_finders mock reset compatibility with Python 3.13+#38

Merged
csett86 merged 2 commits intomainfrom
copilot/fix-ci-failure
Mar 8, 2026
Merged

Fix test_finders mock reset compatibility with Python 3.13+#38
csett86 merged 2 commits intomainfrom
copilot/fix-ci-failure

Conversation

Copy link

Copilot AI commented Mar 8, 2026

In Python 3.13+, _mock_call_count became a read-only property derived from len(_mock_call_args_list). Directly assigning mock.call_count = 0 is silently ignored, causing call counts to accumulate across test sections and producing AssertionError: 10 != 5 (5 leftover + 5 new calls).

Change

Replace all scandir_mocked.call_count = 0 with scandir_mocked.reset_mock() in test_whisper_finder and test_gzipped_whisper_finder:

# Before — silently no-ops on Python 3.13+
scandir_mocked.call_count = 0

# After — correctly clears call_args_list and all derived state
scandir_mocked.reset_mock()
Original prompt

Analyze the latest ci failure and fix it


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

…nders.py

Co-authored-by: csett86 <1392875+csett86@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix latest CI failure issue Fix test_finders mock reset compatibility with Python 3.13+ Mar 8, 2026
@github-actions
Copy link

github-actions bot commented Mar 8, 2026

PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://csett86.github.io/graphite-render/pr-preview/pr-38/

Built to branch gh-pages at 2026-03-08 14:00 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@csett86 csett86 marked this pull request as ready for review March 8, 2026 14:00
@csett86 csett86 merged commit a52028c into main Mar 8, 2026
11 checks passed
@csett86 csett86 deleted the copilot/fix-ci-failure branch March 8, 2026 15:15
@csett86 csett86 mentioned this pull request Mar 10, 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.

2 participants