MCPcopy Create free account
hub / github.com/Autoparallel/learner / create_test_learner

Function create_test_learner

crates/learner/tests/lib.rs:24–35  ·  view source on GitHub ↗

#[tokio::test]

()

Source from the content-addressed store, hash-verified

22
23// #[tokio::test]
24pub async fn create_test_learner() -> (Learner, TempDir, TempDir, TempDir) {
25 let config_dir = tempdir().unwrap();
26 let database_dir = tempdir().unwrap();
27 let storage_dir = tempdir().unwrap();
28 let config = Config::default()
29 .with_database_path(&database_dir.path().join("learner.db"))
30 .with_retrievers_path(Path::new("config/retrievers/"))
31 .with_storage_path(storage_dir.path());
32 let learner =
33 Learner::builder().with_path(config_dir.path()).with_config(config).build().await.unwrap();
34 (learner, config_dir, database_dir, storage_dir)
35}

Calls 7

with_storage_pathMethod · 0.80
with_retrievers_pathMethod · 0.80
with_database_pathMethod · 0.80
pathMethod · 0.80
buildMethod · 0.80
with_pathMethod · 0.80
with_configMethod · 0.45

Tested by

no test coverage detected