-
-
Notifications
You must be signed in to change notification settings - Fork 30.6k
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
Bdb: add a unittest file (test.test_bdb) #63616
Comments
This one is pretty involved. The tests might reach into the guts of the modules a bit too much, I'd be open to less invasive suggestions. |
Is the patch against 3.4? I am not sure if we backport new test files. |
Does all of the code for say, BdbTestCase.setUp, need to be repeated for each test method, versus being put in a .setUpClass method to be executed just once for all the methods in BdbTestCase. |
A less invasive alternative could be to instrument Bdb with a subclass This code could be adapted to run with python bdb. |
I've updated the patch to consolidate some duplicated code. Unfortunately, I wasn't able to move anything to setUpClass without messing even more with the internals. I haven't had a chance to refine the code further based on xdegaye's suggestions, but I wanted to make sure I was getting feedback on the most up-to-date code. |
IDLE's debugger needs multiple patches. It is based on bdb. So I want to be able to understand the bdb code and know that it is sound. The file is nearly devoid of docstrings, so I would like to add those first, probably in a separate patch. A first draft can be derived from the bdb doc. Docstrings will help in reviewing the patch. |
I'll work on the bdb docstrings. |
Please move this new request for enhancement to a separate issue. |
While I have previously done docstrings and tests together, I can see that for this issue, separation might be preferable. Cherl, can you open a new issue and re-title the PR? (I don't know if that will be sufficient to 'move' it, but I hope so.) |
Moved to bpo-30211 for docstrings. |
Thanks Terry and Cheryl for splitting the issue :) |
Wondering if it might make sense to use Mock in this patch? |
PR 5217 adds the test.test_bdb module and provides a framework for adding more tests to the bdb module. Added versions 3.6 and 2.7. This is consistent with what was done in issues bpo-21916 and bpo-25616 for example, but the main reason is that most bdb bug fixes need to be backported to the maintenance and 2.7 versions and should use the same test case whenever possible. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: