Skip to content

Conversation

@ZohebShaikh
Copy link
Contributor

@ZohebShaikh ZohebShaikh commented May 9, 2025

closes DiamondLightSource/python-copier-template#262

The issue where running a single test in the VSCode debugger would trigger other tests was due to a known bug in pytest (pytest issue #7409).

This workaround is no longer necessary because VSCode's Python debugger (vscode-python-debugger) depends on debugpy, where the root cause was fixed in commit 1 and commit 2, as referenced in debugpy issue #275.

Therefore, the workaround can be safely removed. Simply ensure you're using the latest version of the VSCode Python Debugger currently (2025.8.0).More info on the extension: VSCode Python Debugger

@ZohebShaikh ZohebShaikh force-pushed the vscode-debug-test-bug branch from 3f9caef to 79ff5b9 Compare May 9, 2025 10:25
@ZohebShaikh ZohebShaikh changed the title Remove workaround fix: Remove workaround May 9, 2025
@codecov
Copy link

codecov bot commented May 9, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.73%. Comparing base (1d0e5ce) to head (1b18826).
Report is 9 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #940   +/-   ##
=======================================
  Coverage   94.73%   94.73%           
=======================================
  Files          41       41           
  Lines        2486     2486           
=======================================
  Hits         2355     2355           
  Misses        131      131           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ZohebShaikh ZohebShaikh changed the title fix: Remove workaround test: Remove vscode-debugger workaround May 9, 2025
@ZohebShaikh
Copy link
Contributor Author

I recommend testing this change in your local setup before merging, just to be safe.
I've verified it both inside the devcontainer and outside, and everything works as expected.

@callumforrester
Copy link
Contributor

@ZohebShaikh is it worth just directly pushing this to the Python copier template? https://github.com/DiamondLightSource/python-copier-template/blob/main/tests/conftest.py

@ZohebShaikh ZohebShaikh force-pushed the vscode-debug-test-bug branch from 79ff5b9 to 1b18826 Compare May 9, 2025 15:14
@ZohebShaikh
Copy link
Contributor Author

Closing as DiamondLightSource/python-copier-template#264 was merged in python copier template

@ZohebShaikh ZohebShaikh deleted the vscode-debug-test-bug branch May 28, 2025 15:56
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.

Debugging a unit test in vscode also triggers all other tests

3 participants