diff --git a/Lib/test/test_fractions.py b/Lib/test/test_fractions.py index 49fc9c2ba..cf42b8635 100644 --- a/Lib/test/test_fractions.py +++ b/Lib/test/test_fractions.py @@ -1669,7 +1669,6 @@ class FractionTest(unittest.TestCase): self.assertEqual(float(format(f, fmt2)), float(rhs)) self.assertEqual(float(format(-f, fmt2)), float('-' + rhs)) - @unittest.expectedFailure # TODO: RUSTPYTHON; TypeError: '%' not supported between instances of 'Fraction' and 'complex' def test_complex_handling(self): # See issue gh-102840 for more details. @@ -1697,7 +1696,6 @@ class FractionTest(unittest.TestCase): message % ("divmod()", "complex", "Fraction"), divmod, b, a) - @unittest.expectedFailure # TODO: RUSTPYTHON; Wrong error message def test_three_argument_pow(self): message = "unsupported operand type(s) for ** or pow(): '%s', '%s', '%s'" self.assertRaisesMessage(TypeError, diff --git a/crates/vm/src/vm/vm_ops.rs b/crates/vm/src/vm/vm_ops.rs index abce0ea67..9cc2853a0 100644 --- a/crates/vm/src/vm/vm_ops.rs +++ b/crates/vm/src/vm/vm_ops.rs @@ -372,7 +372,7 @@ impl VirtualMachine { } else { self.new_type_error(format!( "unsupported operand type(s) for {}: \ - '{}' and '{}', '{}'", + '{}', '{}', '{}'", op_str, a.class(), b.class(), @@ -401,7 +401,7 @@ impl VirtualMachine { binary_func!(_sub, Subtract, "-"); binary_func!(_mod, Remainder, "%"); - binary_func!(_divmod, Divmod, "divmod"); + binary_func!(_divmod, Divmod, "divmod()"); binary_func!(_lshift, Lshift, "<<"); binary_func!(_rshift, Rshift, ">>"); binary_func!(_and, And, "&");