Skip to content

Commit

Permalink
chore: fix comments
Browse files Browse the repository at this point in the history
  • Loading branch information
zwpaper committed Nov 19, 2024
1 parent d6374c0 commit 0f60a4a
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions crates/tabby-index/src/testutils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ mod indexer_tests {
use tabby_inference::MockEmbedding;
use temp_testdir::TempDir;

/// Test that the indexer return none when the embedding is empty
/// meaning that the chunk is not saved at tantivy
/// Test that the indexer return the document and none itself
/// when the embedding is empty
#[test]
fn test_indexer_empty_embedding() {
let temp_dir = TempDir::default();
Expand Down Expand Up @@ -130,12 +130,14 @@ mod indexer_tests {
env::remove_var("TABBY_ROOT");
}

/// Test that the indexer returns the document and the chunk
/// when the embedding is not empty
#[test]
fn test_indexer_with_embedding() {
let temp_dir = TempDir::default();
env::set_var("TABBY_ROOT", temp_dir.as_ref());

let embedding = MockEmbedding::new(vec![1.0, 2.0]);
let embedding = MockEmbedding::new(vec![1.0]);
let builder = StructuredDocBuilder::new(Arc::new(embedding));
let indexer = TantivyDocBuilder::new(corpus::STRUCTURED_DOC, builder);

Expand Down

0 comments on commit 0f60a4a

Please sign in to comment.