Message350099
> A key question here is why are you trying to avoid the AttributeError case so much?
> but there's a reason that we don't have attribute existence tests before every single attribute access throughout the test suite
Hmm, good point. I may have been fixating on avoiding exceptions within the tests a bit too much, perhaps the exception would be appropriate in this case.
> Basically unless the attribute is dynamic and thus you're explicitly testing the attribute got set then don't worry about it.
Ah, that answers my earlier question, thanks. (:
With an initial glance, do you have any specific ideas as to how test_pkg_import.py should be changed to utilize importlib directly? I've been reading through the docs looking for ideas, but I'll admit that I'm not particularly experienced with using importlib. |
|
Date |
User |
Action |
Args |
2019-08-21 17:14:54 | aeros | set | recipients:
+ aeros, brett.cannon, ncoghlan, eric.snow, serhiy.storchaka |
2019-08-21 17:14:54 | aeros | set | messageid: <1566407694.18.0.103882814525.issue37890@roundup.psfhosted.org> |
2019-08-21 17:14:54 | aeros | link | issue37890 messages |
2019-08-21 17:14:53 | aeros | create | |
|