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 aeros
Recipients aeros, brett.cannon, eric.snow, ncoghlan, serhiy.storchaka
Date 2019-08-21.17:14:53
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1566407694.18.0.103882814525.issue37890@roundup.psfhosted.org>
In-reply-to
Content
> 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.
History
Date User Action Args
2019-08-21 17:14:54aerossetrecipients: + aeros, brett.cannon, ncoghlan, eric.snow, serhiy.storchaka
2019-08-21 17:14:54aerossetmessageid: <1566407694.18.0.103882814525.issue37890@roundup.psfhosted.org>
2019-08-21 17:14:54aeroslinkissue37890 messages
2019-08-21 17:14:53aeroscreate