Skip to content

Fix test_standard_finder failure in Python 3.13#2904

Merged
deniszh merged 3 commits intomasterfrom
copilot/fix-issue-2872
Mar 17, 2026
Merged

Fix test_standard_finder failure in Python 3.13#2904
deniszh merged 3 commits intomasterfrom
copilot/fix-issue-2872

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 17, 2026

In Python 3.13, Mock.call_count became a read-only property computed from call_args_list, so mock.call_count = 0 no longer resets the counter — it silently has no effect. This caused accumulated scandir call counts to bleed across test steps, producing 5 != 1 at the {foo}.bar.* assertion (4 calls from the prior *.ba?.{baz,foo} step + 1 = 5).

Changes

  • tests/test_finders.py: Replace all 20 occurrences of scandir_mock.call_count = 0 with scandir_mock.reset_mock(), which correctly resets call tracking across all Python versions.

💡 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.

Co-authored-by: deniszh <1227222+deniszh@users.noreply.github.com>
Copilot AI changed the title [WIP] [2872] Fix issue with Graphite web application Fix open redirect vulnerability in URL shortener Mar 17, 2026
Copilot AI requested a review from deniszh March 17, 2026 12:55
Co-authored-by: deniszh <1227222+deniszh@users.noreply.github.com>
Copilot AI changed the title Fix open redirect vulnerability in URL shortener Fix test_standard_finder failure in Python 3.13 Mar 17, 2026
Copilot AI requested a review from deniszh March 17, 2026 15:40
@deniszh deniszh marked this pull request as ready for review March 17, 2026 17:14
@deniszh deniszh merged commit 4a11125 into master Mar 17, 2026
7 of 8 checks passed
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