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
Improve Test Coverage Of Pydoc #61666
Comments
Adds some test coverage to pydoc. |
Hi, Here are some small comments to your otherwise good to have patch: -- assertEquals has been deprecated in favor of assertEqual, and usually it's great to be consistent across the test suite |
Sure thing, ill make the improvements and upload a new patch. Thanks! |
--Changes assertequals to assertequal |
Thanks for the patch. Rather than create and destroy a directory for every test (setUp/tearDown), it is possible to use the test.support.temp_cwd context manager to create and destroy one inside the single tests that need it. A nit: we prefer to keep the line length to <80 (that is, max 79). In test_getting_all_methods_from_class, why is 'method_returning_true' not in the list? I also worry that this test is a bit fragile, but I don't have a good suggestion for how to fix that, so we'll probably just have to live with it. |
Thanks for the feedback :-D Changes: Utilize test.support.temp_cwd() Cut line length down. Don't worry about nitpicking. Anything to get this to be as good as possible. I added an explanation to the test class explaining why test_getting_all_methods_from_class does not appear. I also agree this is fragile. I have an idea for how to fix this and will upload it as a separate patch (in this thread) because I am not sure what people will think. |
Eh, sorry... I tried to do a less fragile way of generating the configuration dict. Tried a few things but it very quickly got messy and even worse started to smell like testing the method with... the method being tested. I am open to ideas though. |
New changeset 474f078ec958 by R David Murray in branch 'default': |
As discussed with Matt, I deleted the allmethods tests, since the current behavior is actually a bug. pydoc itself doesn't use allmethods, but I did find that numpy at least does so. A separate issue will be opened for that bug. |
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: