()
| 563 | |
| 564 | #[test] |
| 565 | fn test_add_py_integers() { |
| 566 | Interpreter::without_stdlib(Default::default()).enter(|vm| { |
| 567 | let a: PyObjectRef = vm.ctx.new_int(33_i32).into(); |
| 568 | let b: PyObjectRef = vm.ctx.new_int(12_i32).into(); |
| 569 | let res = vm._add(&a, &b).unwrap(); |
| 570 | let value = int::get_value(&res); |
| 571 | assert_eq!(*value, 45_i32.to_bigint().unwrap()); |
| 572 | }) |
| 573 | } |
| 574 | |
| 575 | #[test] |
| 576 | fn test_multiply_str() { |