KeiSeiKit-1.0/_primitives/_rust/kei-llm-mlx/tests/discovery_bins_absent.rs
Parfii-bot a4e667de10 KeiSeiKit-public — clean state
Single-commit clean baseline after security scrub of niche-tells,
project codenames, internal jargon, and contributor-email leaks.

Contents:
- 100 Rust crates (_primitives/_rust/)
- 37 agent manifests (_manifests/) + generated specs (_generated/)
- 67 user-invocable skills (skills/)
- 33 hooks (hooks/)
- Composition blocks (_blocks/)
- Documentation (docs/, README.md)
- TS adapter packages (_ts_packages/)
- Assembler (_assembler/)
- Roles (_roles/)
- Templates (_templates/)
- Forgejo CI (.forgejo/)

Author: Denis Parfionovich <info@greendragon.info>

License: see LICENSE.
2026-05-01 12:09:03 +08:00

26 lines
835 B
Rust

//! Discovery — neither binary present.
//!
//! Mock both `which` invocations to return non-zero (mlx_lm not pip
//! installed). Assert all `MlxBins` fields are `None`.
use kei_llm_mlx::runner::RunOutput;
use kei_llm_mlx::{discover, MockRunner};
#[test]
fn no_bins_yields_empty_struct() {
std::env::remove_var("KEI_MLX_BIN");
let runner = MockRunner::new()
.with_run(
"which_mlx_lm.generate",
RunOutput::fail(1, "mlx_lm.generate not found"),
)
.with_run(
"which_mlx_lm.server",
RunOutput::fail(1, "mlx_lm.server not found"),
);
let bins = discover(&runner);
assert!(bins.generate.is_none(), "no binary should be discovered");
assert!(bins.server.is_none());
assert!(bins.version.is_none());
assert!(!bins.any_present());
}