-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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
Test discovery fails in testing plugin when cairosvg is imported #221262
Comments
Forgot to add the traceback from the Python output:
|
Hi! We are actively working on this problem to create a way to add in environment variables to testing. You can see our proposal here: microsoft/vscode-python#21845. This means your issue is a duplicate of microsoft/vscode-python#17171 so I am going to close it against that issue but know this is a area in development! Thanks |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Type: Bug
Install
cairo
using brewCreate a blank project with a virtual env and install cairosvg
Create a module
foo.py
and import from cairosvgCreate a test module
Configure testing plugin (I used the UI, but
settings.json
ended up looking like below)Result: Testing plugin shows "Error discovering pytest tests (see Output > Python):"
Note, that commenting out
from cariosvg import svg2png
makes everything work fine. Also note that running pytest from the integrated terminal (with or without the import statement) works fine.I had a similar issue with the debugger which I was able to fix by adding a
launch.json
with the following configuration:I would assume that this could be fixed by adding an environment variable to the testing plugin environment, but I have been unable to figure out how to do so.
VS Code version: Code 1.91.0 (Universal) (ea1445c, 2024-07-01T18:54:18.541Z)
OS version: Darwin arm64 23.5.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
Extensions (33)
(1 theme extensions excluded)
The text was updated successfully, but these errors were encountered: