Skip to content

Commit d9703da

Browse files
committed
🧪 test(detection): add explicit fallback configuration in Chinese path test
- Modify test case to explicitly set `allow_fallback=False` - Improve test configuration for language detection with custom model path - Enhance test coverage for model loading with Chinese characters
1 parent 5ffd54a commit d9703da

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/test_chinese_path.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,10 @@ def test_model_loading_with_chinese_path():
2626
shutil.copy2(model_path, chinese_model_path)
2727

2828
# 正确使用自定义模型路径
29-
config = LangDetectConfig(custom_model_path=str(chinese_model_path))
29+
config = LangDetectConfig(
30+
custom_model_path=str(chinese_model_path),
31+
allow_fallback=False
32+
)
3033
detector = LangDetector(config)
3134
result = detector.detect("This is a test")
3235

0 commit comments

Comments
 (0)