-
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
Show unittest.subTest failures in the Test Explorer #15271
Comments
Can you describe what it is about this function that isn't working correctly? At first glance, I don't know what might be broken (and we get unittest stubs from the typeshed project). A code example would be helpful. |
Oh, this isn't a Pylance thing, this is the text explorer in the Python extension. I'll transfer it. |
Hi @DolajoCZ, Thank you for reaching out! I can confirm that this issue hasn't been introduced recently, I could reproduce it using Python 3.9.0 and the following versions of the extension:
We'll have to investigate it. Notes:
successful tests:
failing tests:
failing tests with subtests:
|
Any update? |
We made some testing-related changes in the latest version of the extension, is it still not working? #16769 |
Unfortunatelly not. I used example bellow but without succes. My version of Python extension is """Test module."""
import unittest
class TestSbTest(unittest.TestCase):
"""Unittest"""
def test_fail_case(self) -> None:
"""Test fail case."""
for i in range(6):
with self.subTest(i=i):
self.assertEqual(i % 2, 0)
# self.assertEqual(i % 2, 0) |
We still haven't addressed it yet then. |
Sorry, I misinterpreted your comment. I thought that this fix was already released. |
Sorry for the confusion! This will be addressed as part of #16936. |
Closing in favor of #16936 where we'll keep this issue in mind while fixing. |
Hello, can you please add support of unittest subTest. Thank you
The text was updated successfully, but these errors were encountered: