I have a test that is parameterized that is only failing when running in parallel, so I want to be able to run it and to put a breakpoint and start debugging when it reaches a certain portion of the code. My problem is that PyCharm Pro 2023.1 isn't stopping at the breakpoint. The only way it stops is when I change the run parameters to remove parallel testing (-n0), which makes my test pass...
Here is my simplified code:
@pytest.mark.parametrize('url', ['url1', 'url2', 'url3'])
def test_list_all_urls(self, url):
print(url). # <----- This is where I put a breakpoint in PyCharm
When I hit DEBUG in PyCharm, I would expect it to stop at the very first line of my test, but it simply ignores the breakpoint.
Is there anything I can do to make PyCharm honor my breakpoint in a pytest running with -n 2?