Not able to debug unittest in vscode for python

28 Views Asked by At

I am able to Run unittest for python in vscode, but not debug it. what did I do wrong?

Structure:

myproject
  \mymodule
      \matrix.py
  \test
      \matrix_test.py

in matrix_test.py:

import unittest
from mymodule import matrix
class MyTestCase(unittest.TestCase):
def test_convert(self):
    self.assertEqual('abc', matrix.convert('abc'))

I am getting error:

ModuleNotFoundError: No module named 'mymodule'
0

There are 0 best solutions below