Message397636
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 __main__.py 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:40 | andrei.avk | set | recipients:
+ andrei.avk, aroberge, lukasz.langa |
2021-07-16 15:38:40 | andrei.avk | set | messageid: <1626449920.51.0.483987683952.issue44648@roundup.psfhosted.org> |
2021-07-16 15:38:40 | andrei.avk | link | issue44648 messages |
2021-07-16 15:38:40 | andrei.avk | create | |
|