diff --git a/Lib/test/datetimetester.py b/Lib/test/datetimetester.py index 004f4214574..0540f94fe93 100644 --- a/Lib/test/datetimetester.py +++ b/Lib/test/datetimetester.py @@ -3011,7 +3011,6 @@ def test_more_strftime(self): self.assertEqual(t.strftime("%z"), "-0200" + z) self.assertEqual(t.strftime("%:z"), "-02:00:" + z) - @unittest.skip("TODO: RUSTPYTHON") def test_strftime_special(self): t = self.theclass(2004, 12, 31, 6, 22, 33, 47) s1 = t.strftime('%c') @@ -3879,7 +3878,6 @@ def test_strftime(self): # gh-85432: The parameter was named "fmt" in the pure-Python impl. t.strftime(format="%f") - @unittest.skip("TODO: RUSTPYTHON") def test_strftime_special(self): t = self.theclass(1, 2, 3, 4) s1 = t.strftime('%I%p%Z') @@ -4360,7 +4358,6 @@ def test_empty(self): self.assertEqual(t.microsecond, 0) self.assertIsNone(t.tzinfo) - @unittest.skip("TODO: RUSTPYTHON") def test_zones(self): est = FixedOffset(-300, "EST", 1) utc = FixedOffset(0, "UTC", -2) diff --git a/Lib/test/test_contains.py b/Lib/test/test_contains.py index 7339f16ace2..259c954aa1d 100644 --- a/Lib/test/test_contains.py +++ b/Lib/test/test_contains.py @@ -16,7 +16,6 @@ def __getitem__(self, n): return [self.el][n] class TestContains(unittest.TestCase): - @unittest.expectedFailure # TODO: RUSTPYTHON; Wrong error message def test_common_tests(self): a = base_set(1) b = myset(1) diff --git a/crates/stdlib/src/csv.rs b/crates/stdlib/src/csv.rs index a1147fd1cbb..27fb1fd982f 100644 --- a/crates/stdlib/src/csv.rs +++ b/crates/stdlib/src/csv.rs @@ -1095,7 +1095,13 @@ mod _csv { } let row = ArgIterable::try_from_object(vm, row.clone()).map_err(|_e| { - new_csv_error(vm, format!("\'{}\' object is not iterable", row.class())) + new_csv_error( + vm, + format!( + "argument of type \'{}\' is not a container or iterable", + row.class() + ), + ) })?; let mut first_flag = true; for field in row.iter(vm)? { diff --git a/crates/vm/src/function/protocol.rs b/crates/vm/src/function/protocol.rs index 402f6d0365b..096a63d112b 100644 --- a/crates/vm/src/function/protocol.rs +++ b/crates/vm/src/function/protocol.rs @@ -107,7 +107,10 @@ where let cls = obj.class(); let iter_fn = cls.slots.iter.load(); if iter_fn.is_none() && !cls.has_attr(identifier!(vm, __getitem__)) { - return Err(vm.new_type_error(format!("'{}' object is not iterable", cls.name()))); + return Err(vm.new_type_error(format!( + "argument of type \'{}\' is not a container or iterable", + cls.name() + ))); } Ok(Self { iterable: obj, diff --git a/crates/vm/src/protocol/iter.rs b/crates/vm/src/protocol/iter.rs index aa6ab6769cd..ffdd7d9cd47 100644 --- a/crates/vm/src/protocol/iter.rs +++ b/crates/vm/src/protocol/iter.rs @@ -140,7 +140,7 @@ impl TryFromObject for PyIter { Ok(Self(seq_iter.into_pyobject(vm))) } else { Err(vm.new_type_error(format!( - "'{}' object is not iterable", + "argument of type \'{}\' is not a container or iterable", iter_target.class().name() ))) }