@koteisaev You can use this pattern if you can still execute a python file. If the code under test isn't avail, then the problem is with pointing the IDE to the venv. Both vscode & pycharm often fail to guess where the venv is and have to be told explicitly. Doesn't work for pytest.
```
import unittest
def add(a, b):
return a + b
class TestAddFunction(unittest.TestCase):
def test_add(self):
self.assertEqual(add(1, 2), 3)
if __name__ == "__main__":
unittest.main()
```