-
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
Error during Django test execution: [WinError 206] The filename or extension is too long #24242
Comments
Hi! Yes this totally makes sense- I will have to make some adjustments to design to support this- thanks for filing this bug!! |
@karthiknadig what is your suggestion here? It is broken because of the way its run here, where it inserts all the test_ids then does a subproccess run. Is there any easier work-around then figuring out all test are selected to run or a folder is selected to run and doing it by that path instead? vscode-python/python_files/unittestadapter/django_handler.py Lines 88 to 94 in 32512b1
|
@eleanorjboyd You might need to do the same thing you did for |
@karthiknadig so the issue is that I can call pytest programmatically via
which I think might cause other problems since I am calling Django by hand instead of deferring to the user. Therefore I don't think it is possible to call it in the same way as how I handle pytest. |
Then the alternative is to find common parent to the selected test cases. We will need to do generic parent finding because users can select tests using search. |
went ahead and asked in the Django forum for any advice before moving forward with the test-id parent finding route: https://forum.djangoproject.com/t/advice-for-vs-code-testing-implementation/37261 |
Type: Bug
I have a lot of tests in my Django app and if I try to launch them all from the test explorator, I'll had an error.
The paths of each tests is part of the django unit command.
Command exceed 46500 characters and Windows can not process it (WinError 206).
Maybe it would be great when all tests in a test files is present, replace each path of the tests by the test file.
And if all tests files are present, removing all tests path ?
Example:
Here, if I want to run all tests from test_file_2.py, command arg should be
tests_directory.test_file_2
instead oftests_directory.test_file_2.TestClass3.test_method_5 tests_directory.test_file_2.TestClass3.test_method_6 tests_directory.test_file_2.TestClass4.test_method_7
Sorry if it's not clear
Extension version: 2024.17.2024100401
VS Code version: Code 1.94.0 (d78a74bcdfad14d5d3b1b782f87255d802b57511, 2024-10-02T13:08:12.626Z)
OS version: Windows_NT x64 10.0.22621
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
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: