Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions Lib/test/test_descr.py
Original file line number Diff line number Diff line change
Expand Up @@ -4952,7 +4952,6 @@ class A(int):
with self.assertRaises(TypeError):
a + a

@unittest.expectedFailure # TODO: RUSTPYTHON
def test_slot_shadows_class_variable(self):
with self.assertRaises(ValueError) as cm:
class X:
Expand All @@ -4961,7 +4960,6 @@ class X:
m = str(cm.exception)
self.assertEqual("'foo' in __slots__ conflicts with class variable", m)

@unittest.expectedFailure # TODO: RUSTPYTHON
def test_set_doc(self):
class X:
"elephant"
Expand Down
4 changes: 2 additions & 2 deletions crates/vm/src/builtins/type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2004,7 +2004,7 @@ impl Constructor for PyType {
// Check if slot name conflicts with class attributes
if attributes.contains_key(vm.ctx.intern_str(slot.as_wtf8())) {
return Err(vm.new_value_error(format!(
"'{}' in __slots__ conflicts with a class variable",
"'{}' in __slots__ conflicts with class variable",
slot.as_wtf8()
)));
}
Expand Down Expand Up @@ -2404,7 +2404,7 @@ impl Py<PyType> {
// Similar to CPython's type_set_doc
let value = value.ok_or_else(|| {
vm.new_type_error(format!(
"cannot delete '__doc__' attribute of type '{}'",
"cannot delete '__doc__' attribute of immutable type '{}'",
self.name()
))
})?;
Expand Down
Loading