mirror of
https://github.com/RustPython/RustPython.git
synced 2026-10-28 18:59:04 +08:00
Fix boundmethod not to have __dict__ + immutable type (#5851)
This commit is contained in:
1 parent
f5ccd4faed
commit
43302cec4d
2 files changed
+1
-5
No files matched your search
Vendored
-4
@@ -276,8 +276,6 @@ class InstancemethodAttrTest(FuncAttrsTest):
|
||||
self.assertEqual(self.fi.a.__self__, self.fi)
|
||||
self.cannot_set_attr(self.fi.a, "__self__", self.fi, AttributeError)
|
||||
|
||||
# TODO: RUSTPYTHON
|
||||
@unittest.expectedFailure
|
||||
def test___func___non_method(self):
|
||||
# Behavior should be the same when a method is added via an attr
|
||||
# assignment
|
||||
@@ -331,8 +329,6 @@ class FunctionDictsTest(FuncAttrsTest):
|
||||
d = UserDict({'known_attr': 7})
|
||||
self.cannot_set_attr(self.fi.a.__func__, '__dict__', d, TypeError)
|
||||
|
||||
# TODO: RUSTPYTHON
|
||||
@unittest.expectedFailure
|
||||
def test_setting_dict_to_valid(self):
|
||||
d = {'known_attr': 7}
|
||||
self.b.__dict__ = d
|
||||
|
||||
@@ -734,7 +734,7 @@ impl PyBoundMethod {
|
||||
|
||||
#[pyclass(
|
||||
with(Callable, Comparable, GetAttr, Constructor, Representable),
|
||||
flags(HAS_DICT)
|
||||
flags(IMMUTABLETYPE)
|
||||
)]
|
||||
impl PyBoundMethod {
|
||||
#[pymethod]
|
||||
|
||||
Reference in new issue
Block a user