3

I am trying to use vscode to debug some unit tests using pytest. One special thing is I am importing the module I need to test from another folder.

src
   func.py
test
   test_func.py

so inside test_func.py, I imported the function I need to test:

import func

def test_func():
...

But when I tried to debug it using vscode, it told me "module func is not found!"

Should I do some extra configuration to make it work?

derek
  • 9,358
  • 11
  • 53
  • 94

0 Answers0