You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Skip test display correctly in test explorer #21674
given a file called skip_test_file_node.py that has raise SkipTest(".....") this should appear in the sidebar with no children. The bug is that currently it shows a "unittest" node that gives "loader" and other incorrect nodes below it.
This is wrong, thought I fixed it with, #21665, but it is still persisting.
Hi! Everything looks right except the file name is not a valid single identifier in Python (I had to do some research because this initially confused me too). But the summary is that Python naming pretty much have to follow these rules so a . or - makes the name invalid. Specifically for . it view it as a module so if you did test_other.test.py it would work with the pattern of *test*.py. So just try again using the name what_test.py and it should work great!
Start with a letter or an underscore (_): Identifiers cannot start with a digit.
Followed by letters, numbers, or underscores: After the first letter or underscore, the identifier can contain any combination of letters (a-z, A-Z), digits (0-9), and underscores (_).
Activity
eleanorjboyd commentedon Oct 23, 2023
yes this is good now. Try with below:
should see single node for the file in the test explorer and no more children under it
joaomoreno commentedon Oct 25, 2023
I'm sorry, it's really not clear to me what I'm doing wrong here:
Screen.Recording.2023-10-25.at.11.31.06.mov
Please provide repro steps.
eleanorjboyd commentedon Oct 25, 2023
Hi! Everything looks right except the file name is not a valid single identifier in Python (I had to do some research because this initially confused me too). But the summary is that Python naming pretty much have to follow these rules so a
.or-makes the name invalid. Specifically for.it view it as a module so if you didtest_other.test.pyit would work with the pattern of*test*.py. So just try again using the namewhat_test.pyand it should work great!