-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
V2024.6.0 unable to test #23392
Comments
@ljh740 Can you provide more details on how your project is structured? If possible provide a minimal repro. |
@eleanorjboyd @karthiknadig Any progress? |
Same problem on one of my own projects. Will look into adding a minimal repo link to help debug. Reverting to v2024.4.1 for now. |
Hi! Could someone include logs or a minimal repro? This would help us narrow down what the issue might be- thanks! |
@eleanorjboyd here is the minimal repro https://github.com/ljh740/pymre |
Hi! Just gave it a try on my machine and the minimal repro sent works on both insiders and vscode stable. To confirm this error happens when you run the test? I was able to discover and run the test in the UI. Follow up question then, can you send your version of python? From the first bug report I see python3.8 being used- do the rest of you have this version? Secondly can you send the full or more logs? I am specifically wondering if the rewrite experiment is on. You can check for it by looking for |
I have the same issue. Python unittest tests suddenly stopped working. No changes in code or config. Windows 10, Python 3.11.
|
@dobin please try the settings mentioned here #23392 (comment) . If those don’t work, please share a minimal repro. |
pythonTestAdapter was enabled. I can reproduce it with the testrepo of karthiknadig from above https://github.com/ljh740/pymre |
I experience the same problem. Platform: Windows 10. Experiments enabled: I checked the source code of the Python extension. I found that if "/" in start_dir: # is a subdir
parent_dir = os.path.dirname(start_dir)
sys.path.insert(0, parent_dir)
else:
sys.path.insert(0, cwd) If I reintroduce these four lines to their original place in version 2024.8.0., then run the test discovery with the testrepo, the error disappears. Original def discover_tests(
start_dir: str,
pattern: str,
top_level_dir: Optional[str],
) -> DiscoveryPayloadDict:
"""..."""
cwd = os.path.abspath(start_dir)
# ... New def discover_tests(
start_dir: str,
pattern: str,
top_level_dir: Optional[str],
) -> DiscoveryPayloadDict:
"""..."""
cwd = os.path.abspath(start_dir)
# start of lines to addd
if "/" in start_dir: # is a subdir
parent_dir = os.path.dirname(start_dir)
sys.path.insert(0, parent_dir)
else:
sys.path.insert(0, cwd)
# end lines
#... These lines were removed at PR #22390 |
Is there a timeline on when the fix for this issue is deployed? |
Hello! I have put a fix out in the most recent version of vscode insiders- would someone be able to get the newest version of the insiders python extension and test to see if this bug is resolved? |
I checked the pre-release version and I can confirm, it fixes the issue. |
Great! Thank you! |
Type: Bug
When I upgraded, I couldn't run the test cases properly.
All use cases cannot find modules in the superior directory.
Right now, I can only roll back to2024.4.1
Extension version: 2024.6.0
VS Code version: Code 1.89.0 (Universal) (b58957e67ee1e712cebf466b995adf4c5307b2bd, 2024-05-01T02:10:10.196Z)
OS version: Darwin arm64 23.4.0
Modes:
System Info
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
webgpu: enabled
A/B Experiments
The text was updated successfully, but these errors were encountered: