Skip to content

Commit e8505ad

Browse files
committed
test: reorder imports for clarity and fix grouping in compact and compact_resume_fork suite
Reordered and grouped imports for consistency in test modules. No functional changes.
1 parent ccbae46 commit e8505ad

File tree

3 files changed

+14
-9
lines changed

3 files changed

+14
-9
lines changed

codex-rs/core/tests/common/responses.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
use serde_json::Value;
2-
use wiremock::matchers::{method, path};
2+
use wiremock::BodyPrintLimit;
33
use wiremock::Mock;
44
use wiremock::MockServer;
5-
use wiremock::BodyPrintLimit;
65
use wiremock::ResponseTemplate;
6+
use wiremock::matchers::method;
7+
use wiremock::matchers::path;
78

89
/// Build an SSE stream body from a list of JSON events.
910
pub fn sse(events: Vec<Value>) -> String {
@@ -96,4 +97,4 @@ pub async fn start_mock_server() -> MockServer {
9697
.body_print_limit(BodyPrintLimit::Limited(80_000))
9798
.start()
9899
.await
99-
}
100+
}

codex-rs/core/tests/suite/compact.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ use codex_core::protocol::Op;
1212
use codex_core::protocol::RolloutItem;
1313
use codex_core::protocol::RolloutLine;
1414
use codex_core::spawn::CODEX_SANDBOX_NETWORK_DISABLED_ENV_VAR;
15-
use core_test_support::{load_default_config_for_test, responses};
15+
use core_test_support::load_default_config_for_test;
16+
use core_test_support::responses;
1617
use core_test_support::wait_for_event;
1718
use tempfile::TempDir;
1819
use wiremock::Mock;
@@ -23,11 +24,14 @@ use wiremock::matchers::method;
2324
use wiremock::matchers::path;
2425

2526
use pretty_assertions::assert_eq;
27+
use responses::ev_assistant_message;
28+
use responses::ev_completed;
29+
use responses::sse;
30+
use responses::start_mock_server;
2631
use std::sync::Arc;
2732
use std::sync::Mutex;
2833
use std::sync::atomic::AtomicUsize;
2934
use std::sync::atomic::Ordering;
30-
use responses::{ev_assistant_message, ev_completed, sse, start_mock_server};
3135
// --- Test helpers -----------------------------------------------------------
3236

3337
pub(super) const FIRST_REPLY: &str = "FIRST_REPLY";

codex-rs/core/tests/suite/compact_resume_fork.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@
1010
use super::compact::FIRST_REPLY;
1111
use super::compact::SUMMARIZE_TRIGGER;
1212
use super::compact::SUMMARY_TEXT;
13-
use core_test_support::responses::ev_assistant_message;
14-
use core_test_support::responses::ev_completed;
15-
use core_test_support::responses::mount_sse_once;
16-
use core_test_support::responses::sse;
1713
use codex_core::CodexAuth;
1814
use codex_core::CodexConversation;
1915
use codex_core::ConversationManager;
@@ -27,6 +23,10 @@ use codex_core::protocol::InputItem;
2723
use codex_core::protocol::Op;
2824
use codex_core::spawn::CODEX_SANDBOX_NETWORK_DISABLED_ENV_VAR;
2925
use core_test_support::load_default_config_for_test;
26+
use core_test_support::responses::ev_assistant_message;
27+
use core_test_support::responses::ev_completed;
28+
use core_test_support::responses::mount_sse_once;
29+
use core_test_support::responses::sse;
3030
use core_test_support::wait_for_event;
3131
use pretty_assertions::assert_eq;
3232
use serde_json::Value;

0 commit comments

Comments
 (0)