Commit 63561e1
authored
fix: util.Namespace follows Attribute protocol so inspect/pytest/et al 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`.1 parent f7080de commit 63561e1
1 file changed
+4
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
29 | 32 | | |
30 | 33 | | |
31 | 34 | | |
| |||
0 commit comments