mirror of
https://github.com/openai/codex.git
synced 2026-11-22 23:16:05 +00:00
fix: address clippy violations that sneaked in (#16715)
These made their way into the codebase in https://github.com/openai/codex/pull/16508 because I haven't managed to get https://github.com/openai/codex/pull/16450 working yet.
This commit is contained in:
1 parent
faab4d39e1
commit
dc07108af8
2 files changed
+16
-8
No files matched your search
@@ -32,8 +32,10 @@ async fn offline_model_info_without_tool_output_override() {
|
|||||||
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
|
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
|
||||||
async fn offline_model_info_with_tool_output_override() {
|
async fn offline_model_info_with_tool_output_override() {
|
||||||
let codex_home = TempDir::new().expect("create temp dir");
|
let codex_home = TempDir::new().expect("create temp dir");
|
||||||
let mut config = ModelsManagerConfig::default();
|
let config = ModelsManagerConfig {
|
||||||
config.tool_output_token_limit = Some(123);
|
tool_output_token_limit: Some(123),
|
||||||
|
..Default::default()
|
||||||
|
};
|
||||||
let auth_manager =
|
let auth_manager =
|
||||||
AuthManager::from_auth_for_testing(CodexAuth::create_dummy_chatgpt_auth_for_testing());
|
AuthManager::from_auth_for_testing(CodexAuth::create_dummy_chatgpt_auth_for_testing());
|
||||||
let manager = ModelsManager::new(
|
let manager = ModelsManager::new(
|
||||||
|
|||||||
@@ -5,8 +5,10 @@ use pretty_assertions::assert_eq;
|
|||||||
#[test]
|
#[test]
|
||||||
fn reasoning_summaries_override_true_enables_support() {
|
fn reasoning_summaries_override_true_enables_support() {
|
||||||
let model = model_info_from_slug("unknown-model");
|
let model = model_info_from_slug("unknown-model");
|
||||||
let mut config = ModelsManagerConfig::default();
|
let config = ModelsManagerConfig {
|
||||||
config.model_supports_reasoning_summaries = Some(true);
|
model_supports_reasoning_summaries: Some(true),
|
||||||
|
..Default::default()
|
||||||
|
};
|
||||||
|
|
||||||
let updated = with_config_overrides(model.clone(), &config);
|
let updated = with_config_overrides(model.clone(), &config);
|
||||||
let mut expected = model;
|
let mut expected = model;
|
||||||
@@ -19,8 +21,10 @@ fn reasoning_summaries_override_true_enables_support() {
|
|||||||
fn reasoning_summaries_override_false_does_not_disable_support() {
|
fn reasoning_summaries_override_false_does_not_disable_support() {
|
||||||
let mut model = model_info_from_slug("unknown-model");
|
let mut model = model_info_from_slug("unknown-model");
|
||||||
model.supports_reasoning_summaries = true;
|
model.supports_reasoning_summaries = true;
|
||||||
let mut config = ModelsManagerConfig::default();
|
let config = ModelsManagerConfig {
|
||||||
config.model_supports_reasoning_summaries = Some(false);
|
model_supports_reasoning_summaries: Some(false),
|
||||||
|
..Default::default()
|
||||||
|
};
|
||||||
|
|
||||||
let updated = with_config_overrides(model.clone(), &config);
|
let updated = with_config_overrides(model.clone(), &config);
|
||||||
|
|
||||||
@@ -30,8 +34,10 @@ fn reasoning_summaries_override_false_does_not_disable_support() {
|
|||||||
#[test]
|
#[test]
|
||||||
fn reasoning_summaries_override_false_is_noop_when_model_is_false() {
|
fn reasoning_summaries_override_false_is_noop_when_model_is_false() {
|
||||||
let model = model_info_from_slug("unknown-model");
|
let model = model_info_from_slug("unknown-model");
|
||||||
let mut config = ModelsManagerConfig::default();
|
let config = ModelsManagerConfig {
|
||||||
config.model_supports_reasoning_summaries = Some(false);
|
model_supports_reasoning_summaries: Some(false),
|
||||||
|
..Default::default()
|
||||||
|
};
|
||||||
|
|
||||||
let updated = with_config_overrides(model.clone(), &config);
|
let updated = with_config_overrides(model.clone(), &config);
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user