diff --git a/Lib/test/test_memoryio.py b/Lib/test/test_memoryio.py index 7214a377067..0ae48600529 100644 --- a/Lib/test/test_memoryio.py +++ b/Lib/test/test_memoryio.py @@ -1026,10 +1026,6 @@ def test_relative_seek(self): def test_flags(self): return super().test_flags() - @unittest.expectedFailure # TODO: RUSTPYTHON; AttributeError: 'StringIO' object has no attribute 'detach' - def test_detach(self): - return super().test_detach() - @unittest.expectedFailure # TODO: RUSTPYTHON; AttributeError: 'StringIO' object has no attribute 'newlines'. Did you mean: 'readlines'? def test_newlines_property(self): return super().test_newlines_property() diff --git a/Lib/test/test_types.py b/Lib/test/test_types.py index 01da70b4c68..63bc0803e79 100644 --- a/Lib/test/test_types.py +++ b/Lib/test/test_types.py @@ -45,7 +45,6 @@ def clear_typing_caches(): class TypesTests(unittest.TestCase): - @unittest.skipUnless(c_types, "TODO: RUSTPYTHON; requires _types module") def test_names(self): c_only_names = {'CapsuleType'} ignored = {'new_class', 'resolve_bases', 'prepare_class', @@ -636,7 +635,7 @@ def test_slot_wrapper_types(self): self.assertIsInstance(object.__lt__, types.WrapperDescriptorType) self.assertIsInstance(int.__lt__, types.WrapperDescriptorType) - @unittest.expectedFailure # TODO: RUSTPYTHON; No signature found in builtin method __get__ of 'method_descriptor' objects. + @unittest.expectedFailure # TODO: RUSTPYTHON; ValueError: no signature found for builtin PyResult { + _unsupported(vm, &zelf, "read") + } + + #[pymethod] + fn write(zelf: PyObjectRef, _b: PyObjectRef, vm: &VirtualMachine) -> PyResult { + _unsupported(vm, &zelf, "write") + } + + #[pymethod] + fn truncate(zelf: PyObjectRef, _pos: OptionalArg, vm: &VirtualMachine) -> PyResult { + _unsupported(vm, &zelf, "truncate") + } + + #[pymethod] + fn readline(zelf: PyObjectRef, vm: &VirtualMachine) -> PyResult { + _unsupported(vm, &zelf, "readline") + } + + #[pymethod] + fn detach(zelf: PyObjectRef, vm: &VirtualMachine) -> PyResult { + _unsupported(vm, &zelf, "detach") + } + #[pygetset] fn encoding(_zelf: PyObjectRef, vm: &VirtualMachine) -> PyObjectRef { vm.ctx.none() } + #[pygetset] + fn newlines(_zelf: PyObjectRef, vm: &VirtualMachine) -> PyObjectRef { + vm.ctx.none() + } + #[pygetset] fn errors(_zelf: PyObjectRef, vm: &VirtualMachine) -> PyObjectRef { vm.ctx.none()