Skip to content

Commit

Permalink
fix 🔨: remove falsepositive test
Browse files Browse the repository at this point in the history
  • Loading branch information
toadharvard committed Mar 25, 2024
1 parent 67157e1 commit 3974132
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions stopwords-iso_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package stopwordsiso

import (
"os"
"testing"
)

Expand Down Expand Up @@ -55,21 +54,3 @@ func TestStopwordsMapping_ClearString(t *testing.T) {
t.Errorf("StopwordsMapping.ClearString() got = %v, want %v", got, want)
}
}

func TestNewStopwordsMapping_Error(t *testing.T) {
// Temporarily rename the stopwords file to simulate an error
err := os.Rename("stopwords-iso.json", "stopwords-iso_backup.json")
if err != nil {
t.Errorf("Error renaming stopwords-iso.json: %v", err)
}
defer func() {
err := os.Rename("stopwords-iso_backup.json", "stopwords-iso.json")
if err != nil {
t.Errorf("Error renaming stopwords-iso_backup.json: %v", err)
}
}()
_, err = NewStopwordsMapping()
if err == nil {
t.Errorf("Expected an error when stopwords-iso.json does not exist")
}
}

0 comments on commit 3974132

Please sign in to comment.