-
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
Nested test classes not displaying pytest #22520
Comments
I honestly didn't know you could nest classes like this! Do you think it is necessary to handle an unknown number of nested classes or is going 2 levels down sufficient? Will investigate a fix. Thanks |
I would support up to at least 3, with supporting more (or an arbitrary amount) being better. I haven't needed to write 3 levels deep, but nested classes are an organization thing and it seems plausible there's some edge cases in some repos where it goes beyond 2. Like a user might do this: class TestMyClass:
def test_something_integration(self):
...
class TestAMethod:
def test_ungrouped_test(self):
...
class TestGroupA:
class TestGroupB:
|
sweet thanks! Added this as a bug but no promises on a timeline for when I can work on this. |
Type: Bug
Create a pytest structure like this:
Extension version: 2023.20.0
VS Code version: Code 1.84.2 (1a5daa3a0231a0fbba4f14db7ec463cf99d7768e, 2023-11-09T10:51:52.184Z)
OS version: Windows_NT x64 10.0.19045
Modes:
Remote OS version: Linux x64 6.2.0-1016-azure
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
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
A/B Experiments
You can easily reproduce this bug in a codespace for megamock
https://github.com/JamesHutchison/megamock
Logs indicate pytest is correctly finding the tests so it appears this is a bug in how the results are interpreted
The text was updated successfully, but these errors were encountered: