()
| 809 | |
| 810 | #[test] |
| 811 | fn pymethods_rewrite_args() { |
| 812 | let mut ta = BTreeMap::new(); |
| 813 | ta.insert(10, "x".to_string()); |
| 814 | let e = PyExpr { |
| 815 | inner: Expr::ArgRef(10), |
| 816 | name: None, |
| 817 | temp_args: ta, |
| 818 | }; |
| 819 | let mapping = HashMap::from([(10, 0)]); |
| 820 | let result = e.rewrite_args(mapping); |
| 821 | assert_eq!(result.inner, Expr::ArgRef(0)); |
| 822 | assert_eq!(result.temp_args.get(&0), Some(&"x".to_string())); |
| 823 | } |
| 824 | |
| 825 | // --- Coerce int --- |
| 826 |
nothing calls this directly
no test coverage detected