MCPcopy Create free account
hub / github.com/dgrunwald/rust-cpython / prepare_env

Function prepare_env

tests/test_sharedref.rs:7–14  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

5});
6
7fn prepare_env() -> (GILGuard, Owner) {
8 let gil = Python::acquire_gil();
9 let owner = {
10 let py = gil.python();
11 Owner::create_instance(py, "new".to_owned()).unwrap()
12 };
13 (gil, owner)
14}
15
16#[test]
17fn test_leaked_borrow() {

Calls 1

pythonMethod · 0.80

Tested by

no test coverage detected