-
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
Djnago Testing Error #24657
Comments
I also tried from my host system, a Windows machine, without using the dev container, and I get the same error only on Windows. 2024-12-24 19:08:58.483 [info] Discover tests for workspace name: EDDAI-EliteDangerousApiInterface - uri: c:\Users\fabio\Documents\GitHub\EDDAI-EliteDangerousApiInterface 2024-12-24 19:09:00.437 [info] > ~\miniconda3\Scripts\conda.exe run -p ..conda --no-capture-output python ~.vscode\extensions\ms-python.python-2024.22.1-win32-x64\python_files\get_output_via_markers.py ~.vscode\extensions\ms-python.python-2024.22.1-win32-x64\python_files\unittestadapter\discovery.py --udiscovery -p test.py 2024-12-24 19:09:02.469 [info] MANAGE_PY_PATH is set, running Django discovery with path to manage.py as: $C:\Users\fabio\Documents\GitHub\EDDAI-EliteDangerousApiInterface\eddai_EliteDangerousApiInterface\manage.py 2024-12-24 19:09:02.469 [info] Running Django tests with command: ['c:\Users\fabio\Documents\GitHub\EDDAI-EliteDangerousApiInterface\.conda\python.exe', 'C:\Users\fabio\Documents\GitHub\EDDAI-EliteDangerousApiInterface\eddai_EliteDangerousApiInterface\manage.py', 'test', '--testrunner=django_test_runner.CustomDiscoveryTestRunner', '-p', 'test.py'] 2024-12-24 19:09:04.638 [error] Test Discovery named pipe \.\pipe\python-test-discovery-c8d35517c3a59356ecbe error: TypeError: Cannot read properties of null (reading 'path') 2024-12-24 19:09:04.853 [info] Found 0 test(s). <<<PYTHON-EXEC-OUTPUT The Conda environment was created from VSCode by clicking on "Create Virtual Environment" and selecting Conda. |
Type: Bug
I am trying to use the Django testing feature implemented in August, but I am encountering difficulties. I am using a Conda environment inside a dev container that utilizes this image: continuumio/miniconda3:latest. However, when I try to run the tests, I get the following errors:
2024-12-24 17:49:50.742 [info] Discover tests for workspace name: EDDAI-EliteDangerousApiInterface - uri: /workspaces/EDDAI-EliteDangerousApiInterface
2024-12-24 17:49:50.742 [info] Running discovery for unittest using the new test adapter.
2024-12-24 17:49:50.756 [info] > conda run -n base --no-capture-output python ~/.vscode-server/extensions/ms-python.python-2024.22.1-linux-x64/python_files/get_output_via_markers.py ~/.vscode-server/extensions/ms-python.python-2024.22.1-linux-x64/python_files/printEnvVariables.py
2024-12-24 17:49:50.756 [info] shell: bash
2024-12-24 17:49:51.896 [info] Discovering unittest tests for workspace /workspaces/EDDAI-EliteDangerousApiInterface with arguments: /root/.vscode-server/extensions/ms-python.python-2024.22.1-linux-x64/python_files/unittestadapter/discovery.py,--udiscovery,-p,test.py
2024-12-24 17:49:51.896 [info] > conda run -n base --no-capture-output python ~/.vscode-server/extensions/ms-python.python-2024.22.1-linux-x64/python_files/get_output_via_markers.py ~/.vscode-server/extensions/ms-python.python-2024.22.1-linux-x64/python_files/unittestadapter/discovery.py --udiscovery -p test.py
2024-12-24 17:49:51.896 [info] cwd: .
2024-12-24 17:49:52.914 [info] >>>PYTHON-EXEC-OUTPUT
2024-12-24 17:49:52.947 [info] MANAGE_PY_PATH is set, running Django discovery with path to manage.py as: $/workspaces/EDDAI-EliteDangerousApiInterface/eddai_EliteDangerousApiInterface/manage.py
2024-12-24 17:49:52.951 [info] Running Django tests with command: ['/opt/conda/bin/python', '/workspaces/EDDAI-EliteDangerousApiInterface/eddai_EliteDangerousApiInterface/manage.py', 'test', '--testrunner=django_test_runner.CustomDiscoveryTestRunner', '-p', 'test.py']
2024-12-24 17:49:57.044 [error] Test Discovery named pipe /tmp/user/0/python-test-discovery-a8be1522eb245c648034 error: TypeError: Cannot read properties of null (reading 'path')
at e (/root/.vscode-server/extensions/ms-python.python-2024.22.1-linux-x64/out/client/extension.js:2:963511)
at t.PythonResultResolver._resolveDiscovery (/root/.vscode-server/extensions/ms-python.python-2024.22.1-linux-x64/out/client/extension.js:2:942532)
at t.PythonResultResolver.resolveDiscovery (/root/.vscode-server/extensions/ms-python.python-2024.22.1-linux-x64/out/client/extension.js:2:941616)
at /root/.vscode-server/extensions/ms-python.python-2024.22.1-linux-x64/out/client/extension.js:2:1011606
at b.callback (/root/.vscode-server/extensions/ms-python.python-2024.22.1-linux-x64/out/client/extension.js:2:962221)
at Object.thunk (/root/.vscode-server/extensions/ms-python.python-2024.22.1-linux-x64/out/client/extension.js:2:2057316)
2024-12-24 17:49:57.186 [error]
2024-12-24 17:49:57.186 [info] Found 0 test(s).
<<<PYTHON-EXEC-OUTPUT
I don't think this is an issue caused by the dev container. Below, I am also providing the environment.yml file from Conda with my dependencies to help you understand the problem:
`channels:
dependencies:
Lastly, I am including the Docker file that generates my dev container for completeness.
FROM continuumio/miniconda3:latest
COPY environment.yml* .devcontainer/noop.txt /tmp/conda-tmp/
RUN if [ -f "/tmp/conda-tmp/environment.yml" ]; then umask 0002 && /opt/conda/bin/conda env update -n base -f /tmp/conda-tmp/environment.yml; fi
&& rm -rf /tmp/conda-tmp
Extension version: 2024.22.1
VS Code version: Code 1.96.2 (fabdb6a30b49f79a7aba0f2ad9df9b399473380f, 2024-12-19T10:22:47.216Z)
OS version: Windows_NT x64 10.0.26100
Modes:
Remote OS version: Linux x64 5.15.133.1-microsoft-standard-WSL2
python.languageServer
setting: DefaultUser Settings
Installed Extensions
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
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
A/B Experiments
The text was updated successfully, but these errors were encountered: