This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author andrei.avk
Recipients andrei.avk, aroberge, lukasz.langa
Date 2021-07-16.15:38:40
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
This is kind of interesting:

 - The unit test was wrong, it was catching the wrong OSError. (I was catching regex first but after some tweaking and changes I lost it and forgot to readd)

 - The reason it was passing is exactly what you pointed out -- the in `unittest` package. After I change the class' module to __main__ in the test, it starts looking at sys.modules['__main__'] which is the one in unittest, which doesn't have this class, which causes the inspect to throw another OSError.

 - I fixed the unit test by both checking for error regex and patching sys.modules['__main__'] (and of course restoring it later).

Thanks for helping to catch this :-)
Date User Action Args
2021-07-16 15:38:40andrei.avksetrecipients: + andrei.avk, aroberge, lukasz.langa
2021-07-16 15:38:40andrei.avksetmessageid: <>
2021-07-16 15:38:40andrei.avklinkissue44648 messages
2021-07-16 15:38:40andrei.avkcreate