I am trying to debug an existing set of unit tests that are run with tox. I updated my launch.json file to include the following configuration:
{
"module": "tox",
"name": "tox unit tests",
"request": "launch",
"type": "python",
"console": "integratedTerminal"
}
The tests run within vscode integrated terminal, but any breakpoints I set do not get hit so it doesn't seem like I have everything quite right.
How can I be able to catch breakpoints within my code?
Here is an example of one test structure:
class TestController(TestCase):
@patch("server.services.get", "")
def test_handle_item(self, mock_get):
a = controller.handle_item(MOCK_ID)
self.assertEqual(a, 2)