Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

chore(tests): reformat long assertions and chained calls

Steven Enamakele2996c4c71b4
diff --git a/crates/openhuman-core/src/agent/harness/session/builder/builder_tests_tool_exposure_tests.rs b/crates/openhuman-core/src/agent/harness/session/builder/builder_tests_tool_exposure_tests.rs
index 6cf6f2c910..0269a34520 100644
--- a/crates/openhuman-core/src/agent/harness/session/builder/builder_tests_tool_exposure_tests.rs
+++ b/crates/openhuman-core/src/agent/harness/session/builder/builder_tests_tool_exposure_tests.rs
@@ -24,13 +24,16 @@ fn resetting_wildcard_visibility_keeps_collapsed_exposure() {
.get("tools_agent")
.cloned()
.expect("tools_agent built-in definition");
- let mut agent = crate::agent::Agent::from_config_with_definition(&config, &definition, None, None)
- .expect("build tools agent");
+ let mut agent =
+ crate::agent::Agent::from_config_with_definition(&config, &definition, None, None)
+ .expect("build tools agent");
agent.set_visible_tool_names(std::collections::HashSet::new());
let visible = agent.visible_tool_specs_arc();
- assert!(visible.iter().any(|spec| spec.name == crate::memory::tools::MEMORY_TOOL_NAME));
+ assert!(visible
+ .iter()
+ .any(|spec| spec.name == crate::memory::tools::MEMORY_TOOL_NAME));
assert!(!visible.iter().any(|spec| spec.name == "memory_store"));
}
@@ -42,14 +45,17 @@ fn hiding_and_reseeding_wildcard_visibility_keeps_collapsed_exposure() {
.get("tools_agent")
.cloned()
.expect("tools_agent built-in definition");
- let mut agent = crate::agent::Agent::from_config_with_definition(&config, &definition, None, None)
- .expect("build tools agent");
+ let mut agent =
+ crate::agent::Agent::from_config_with_definition(&config, &definition, None, None)
+ .expect("build tools agent");
agent.set_visible_tool_names(std::collections::HashSet::new());
agent.hide_tools(&[crate::memory::tools::MEMORY_TOOL_NAME]);
let visible = agent.visible_tool_specs_arc();
- assert!(!visible.iter().any(|spec| spec.name == crate::memory::tools::MEMORY_TOOL_NAME));
+ assert!(!visible
+ .iter()
+ .any(|spec| spec.name == crate::memory::tools::MEMORY_TOOL_NAME));
assert!(!visible.iter().any(|spec| spec.name == "memory_store"));
}
diff --git a/crates/openhuman-core/src/tools/ops_tests_default_registry_tests.rs b/crates/openhuman-core/src/tools/ops_tests_default_registry_tests.rs
index c0c7c53a3d..5b37e259f7 100644
--- a/crates/openhuman-core/src/tools/ops_tests_default_registry_tests.rs
+++ b/crates/openhuman-core/src/tools/ops_tests_default_registry_tests.rs
@@ -69,14 +69,17 @@ fn all_tools_registers_collapsed_memory_and_search_tools() {
.iter()
.find(|tool| tool.name() == crate::memory::tools::MEMORY_TOOL_NAME)
.expect("collapsed memory tool must be registered");
- assert_eq!(tool_group(memory.name()), crate::core::all::DomainGroup::Memory);
+ assert_eq!(
+ tool_group(memory.name()),
+ crate::core::all::DomainGroup::Memory
+ );
assert_eq!(
tool_capability(memory.name()),
Some(tinymemory_api::capabilities::Capability::Core)
);
- assert!(tools.iter().any(|tool| {
- tool.name() == crate::tools::implementations::meta::TOOL_SEARCH_NAME
- }));
+ assert!(tools
+ .iter()
+ .any(|tool| { tool.name() == crate::tools::implementations::meta::TOOL_SEARCH_NAME }));
}
/// The three `whatsapp_data_*` agent tools are gone, in every build.