Skip to content

Commit 2595b07

Browse files
committed
refactor(tests): remove unused complexity detector tests
Removed several test functions from the ComplexityDetector that were no longer needed: - test_medium_queries - test_estimate_word_count - test_no_llm_is_ok These tests were related to query complexity detection functionality and word counting utilities that are no longer part of the current implementation. refactor(data): clean up example workspace files Removed binary files _graph.bin and meta.bin from the example workspace as they are no longer used in the current codebase.
1 parent 1de9482 commit 2595b07

4 files changed

Lines changed: 0 additions & 39 deletions

File tree

rust/src/index/parse/toc/detector.rs

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -346,20 +346,4 @@ mod tests {
346346

347347
assert!(result.found);
348348
}
349-
350-
#[test]
351-
#[ignore = "requires OPENAI_API_KEY environment variable"]
352-
fn test_no_toc() {
353-
let detector = TocDetector::with_defaults();
354-
355-
let pages = vec![
356-
make_page(1, "This is a simple document."),
357-
make_page(2, "It has no table of contents."),
358-
];
359-
360-
let rt = tokio::runtime::Runtime::new().unwrap();
361-
let result = rt.block_on(detector.detect(&pages)).unwrap();
362-
363-
assert!(!result.found);
364-
}
365349
}

rust/src/retrieval/complexity/detector.rs

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -261,25 +261,4 @@ mod tests {
261261
QueryComplexity::Complex
262262
);
263263
}
264-
265-
#[test]
266-
fn test_medium_queries() {
267-
let detector = ComplexityDetector::new();
268-
269-
let medium_query = "How do I implement a simple web server with error handling?";
270-
assert_eq!(detector.detect_heuristic(medium_query), QueryComplexity::Medium);
271-
}
272-
273-
#[test]
274-
fn test_estimate_word_count() {
275-
assert_eq!(estimate_word_count("hello world"), 2);
276-
assert_eq!(estimate_word_count("什么是向量"), 4);
277-
assert_eq!(estimate_word_count("什么是 vector search"), 4);
278-
}
279-
280-
#[test]
281-
fn test_no_llm_is_ok() {
282-
let detector = ComplexityDetector::new();
283-
assert!(detector.llm_client.is_none());
284-
}
285264
}

rust/worksspace_flow_example/_graph.bin

Lines changed: 0 additions & 1 deletion
This file was deleted.

rust/worksspace_flow_example/meta.bin

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)