()
| 381 | |
| 382 | #[test] |
| 383 | fn test_compare() { |
| 384 | use std::cmp::Ordering; |
| 385 | let gil = Python::acquire_gil(); |
| 386 | let py = gil.python(); |
| 387 | let one = 1i32.to_py_object(py).into_object(); |
| 388 | assert_eq!(one.compare(py, 1).unwrap(), Ordering::Equal); |
| 389 | assert_eq!(one.compare(py, 2).unwrap(), Ordering::Less); |
| 390 | assert_eq!(one.compare(py, 0).unwrap(), Ordering::Greater); |
| 391 | } |
| 392 | } |
nothing calls this directly
no test coverage detected