MCPcopy Create free account
hub / github.com/YuminosukeSato/ironkernel / pymethods_rewrite_args

Function pymethods_rewrite_args

src/python/py_expr.rs:811–823  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

rewrite_argsMethod · 0.80

Tested by

no test coverage detected