bpo-46442: improve testExceptionCleanupNames#30753
bpo-46442: improve testExceptionCleanupNames#30753yellowdusk1590 wants to merge 0 commit intopython:mainfrom
Conversation
|
Hello, and thanks for your contribution! I'm a bot set up to make sure that the project can legally accept this contribution by verifying everyone involved has signed the PSF contributor agreement (CLA). CLA MissingOur records indicate the following people have not signed the CLA: For legal reasons we need all the people listed to sign the CLA before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue. If you have recently signed the CLA, please wait at least one business day You can check yourself to see if the CLA has been received. Thanks again for the contribution, we look forward to reviewing it! |
Lib/test/test_exceptions.py
Outdated
There was a problem hiding this comment.
While you're here, could you rename this to test_exception_cleanup_names (and any other tests you see with camel case names?)
(Make sure test names are unique after your change.)
There was a problem hiding this comment.
I think renaming (except for possibly this one test) should happen in a different commit.
sobolevn
left a comment
There was a problem hiding this comment.
Congrats on your first PR to CPython 🎉
Make sure to sign our CLA.
Feel free to ping me if you need help.
Lib/test/test_exceptions.py
Outdated
There was a problem hiding this comment.
I would say that self.assertIsInstance(e, Exception) makes a bit more sense here 🤔
But, I think it is ok to keep this in sync with the second part.
There was a problem hiding this comment.
Could change both to self.assertIsNotNone(e)
There was a problem hiding this comment.
Yeah, I just copy-pasted the existing code. I don't think it really matters what it does there, just e would be just as fine, because I am sure there are other tests which test that the caught exception is indeed an exception :)
8107787 to
5b86980
Compare
|
I have no idea what I've done, tried to rebase and ended up messing everything up. I'll open a new PR. |
Ok, leave out the test name changing commit - there is no consensus on that. |
The test tested that explicitly deleting the local variable bound to the exception
did not cause problems, but it did not test what it actually claimed to test, i.e.
that the variable is deleted automatically.
https://bugs.python.org/issue46442