Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: util.Namespace follows Attribute protocol so inspect/pytest/et a…
…l work again (#270) I make use of `signxml` for SAML XML verification. I recently tried to make `pytest` validate all my doctests, however due to `util.Namespace` not following the Attribute protocol (i.e. an override of `__getattr__`) -- on missing attributes, one should **always** raise `AttributeError` as that allows any introspection via the `inspect` module to "Just Work". I was able to diagnose that the error was identical to pytest-dev/pytest#5080 and that a remediation was simply catching `KeyError` and re-raising as `AttributeError`.
- Loading branch information