diff --git a/Lib/test/test_math.py b/Lib/test/test_math.py index 456695ecef8..98185c30064 100644 --- a/Lib/test/test_math.py +++ b/Lib/test/test_math.py @@ -377,8 +377,6 @@ def testAtan2(self): self.assertTrue(math.isnan(math.atan2(NAN, INF))) self.assertTrue(math.isnan(math.atan2(NAN, NAN))) - # TODO: RUSTPYTHON - @unittest.expectedFailure def testCbrt(self): self.assertRaises(TypeError, math.cbrt) self.ftest('cbrt(0)', math.cbrt(0), 0) diff --git a/stdlib/src/math.rs b/stdlib/src/math.rs index 6ceb0e4917a..91ae0b57c70 100644 --- a/stdlib/src/math.rs +++ b/stdlib/src/math.rs @@ -541,6 +541,11 @@ mod math { math_perf_arb_len_int_op(args, |x, y| x.lcm(y.as_bigint()), BigInt::one()) } + #[pyfunction] + fn cbrt(x: ArgIntoFloat) -> f64 { + x.cbrt() + } + #[pyfunction] fn fsum(seq: ArgIterable, vm: &VirtualMachine) -> PyResult { let mut partials = vec![];