-
-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't run unittests in debug mode? #126
Comments
Any plans to address this issue? I am seeing the exact same issue. |
This feature would be very useful. In the meantime, here is a workaround. Save the following code as, for instance, "main_pytest.py", and run it in Spyder. Not need to debug. The debugger will stop automatically on the pytest.main() line. Continue the execution to jump to your own breakpoints.
|
Is there a workaround for unittest? The below does not find any test cases. |
I just gave it a try. What worked for me is to add the following lines to the test module you want to debug:
And then start debugging the file. In my test project, I cannot get spider-unittest to discover my unitttest tests. Maybe this is due to unittest’s discovery, it seems a bit pickier than PyTest’s. In the meantime, we gave up using Spyder for software development at my company, it is too limited. We use PyCharm instead. |
Note to self: Keep an eye on the Run plugin, PR spyder-ide/spyder#17467, maybe debugging will be implemented through this. |
I'm using (similar to above)
Can spyder-unittest add a menu item called |
Description of your problem
I am not sure how to get the unittest runner to stop at set breakpoints. This is probably simple user error. Please guide me?
Please keep up the good work.
What steps will reproduce the problem?
What is the expected output? What do you see instead?
The execution should stop at the set breakpoints. Similar to the behaviour of Ctrl+F5 when attempting to execute a script from the IDE.
Key versions and other information:
Apologies for the patchy information. I highly suspect this is not a bug and I am missing something on the UI or the docs.
The text was updated successfully, but these errors were encountered: