-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
✅ More RootModel
tests
#5943
✅ More RootModel
tests
#5943
Conversation
Deploying with Cloudflare Pages
|
8f10588
to
a8186f0
Compare
please review |
# TODO: Should this be an `AttributeError`? | ||
with pytest.raises(ValueError, match='other_attr'): | ||
m.other_attr = 10 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It shouldn't be ValueError
, but not sure if it should be something different than AttributeError
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In vanilla Python it's AttributeError
.
>>> class A:
... __slots__ = ()
...
>>> a = A()
>>> a.foo = 42
Traceback (most recent call last):
Cell In[10], line 1
a.foo = 42
AttributeError: 'A' object has no attribute 'foo'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you going to use AttributeError
on this PR then?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not in this one. Maybe later. That is why I did put TODO
here:)
please update |
@Kludex please review |
Change Summary
Add tests illustrating
RootModel
issuesRelated issue number
None
Checklist
changes/<pull request or issue id>-<github username>.md
file added describing change(see changes/README.md for details)
Selected Reviewer: @samuelcolvin