Fix clippy warning

This commit is contained in:
David Hewitt 2020-03-29 23:12:26 +01:00 committed by kngwyu
parent ac418ce020
commit 1efe142566
1 changed files with 4 additions and 4 deletions

View File

@ -49,10 +49,10 @@ fn unary_arithmetic() {
let gil = Python::acquire_gil();
let py = gil.python();
let c = PyCell::new(py, UnaryArithmetic::new(2.718281)).unwrap();
py_run!(py, c, "assert repr(-c) == 'UA(-2.718281)'");
py_run!(py, c, "assert repr(+c) == 'UA(2.718281)'");
py_run!(py, c, "assert repr(abs(c)) == 'UA(2.718281)'");
let c = PyCell::new(py, UnaryArithmetic::new(2.7)).unwrap();
py_run!(py, c, "assert repr(-c) == 'UA(-2.7)'");
py_run!(py, c, "assert repr(+c) == 'UA(2.7)'");
py_run!(py, c, "assert repr(abs(c)) == 'UA(2.7)'");
py_run!(py, c, "assert repr(round(c)) == 'UA(3)'");
py_run!(py, c, "assert repr(round(c, 1)) == 'UA(3)'");
}