()
| 707 | |
| 708 | #[tokio::test] |
| 709 | async fn test_learner_creation() { |
| 710 | let config_dir = tempdir().unwrap(); |
| 711 | let database_dir = tempdir().unwrap(); |
| 712 | let storage_dir = tempdir().unwrap(); |
| 713 | let config = Config::default() |
| 714 | .with_database_path(&database_dir.path().join("learner.db")) |
| 715 | .with_retrievers_path(&config_dir.path().join("config/retrievers/")) |
| 716 | .with_storage_path(storage_dir.path()); |
| 717 | let learner = |
| 718 | Learner::builder().with_path(config_dir.path()).with_config(config).build().await.unwrap(); |
| 719 | |
| 720 | assert_eq!(learner.config.retrievers_path, config_dir.path().join("config/retrievers/")); |
| 721 | assert_eq!(learner.config.database_path, database_dir.path().join("learner.db")); |
| 722 | assert_eq!(learner.database.get_storage_path().await.unwrap(), storage_dir.path()); |
| 723 | } |
| 724 | } |
nothing calls this directly
no test coverage detected