Unittest no being found

Hello,

I’m having a weird issue with Unittest. Since it’s part of the main library, should work just importing the module.

Although even I’m importing Unittest, I can’t find any declaration or call any of it’s functions, as the screenshot shows:
image

Thought it would be an issue with the latest version (3.12, not using the pre release). I installed versions 3.11 and 3.10, but still having the same issue.

Any suggestions that may help fix the issue?

The screenshot shows that your IDE doesn’t find typing information for this function. Do you get error messages when executing the code?

Does not appear anything, but I know it works, tested my code by SSH in another environment.

I reinstalled VSCode and Python, but still having the issue.

Try running your code outside of vs code. What happens?

It’s difficult to tell from that tiny bit of code, but the fact that your IDE underlines self suggests to me that you are doing this at a location where self is not defined. Do you understand that the way you use the unittest is by extending the TestCase class and writing test methods inside your class?

It is worth following the example in: https://docs.python.org/3/library/unittest.html#basic-example

If that doesn’t solve it, post us enough code to appreciate the context. And not a screenshot, do it like this: About the Python Help category

Here is some advice for how to show us the problem in a way that lets us properly understand exactly what is happening: