mirror of
https://github.com/LibreTranslate/LibreTranslate.git
synced 2026-06-07 22:55:18 -04:00
load only en & es models (avoid to download all models)
This commit is contained in:
@@ -2,12 +2,14 @@ import sys
|
||||
import pytest
|
||||
|
||||
from app.app import create_app
|
||||
from app.default_values import DEFAULT_ARGUMENTS
|
||||
from app.main import get_args
|
||||
|
||||
|
||||
@pytest.fixture()
|
||||
def app():
|
||||
sys.argv = ['']
|
||||
DEFAULT_ARGUMENTS['LOAD_ONLY'] = "en,es"
|
||||
app = create_app(get_args())
|
||||
|
||||
yield app
|
||||
|
||||
+2
-2
@@ -4,6 +4,6 @@ from argostranslate import package
|
||||
|
||||
def test_boot_argos():
|
||||
"""Test Argos translate models initialization"""
|
||||
boot()
|
||||
boot(["en", "es"])
|
||||
|
||||
assert len(package.get_installed_packages()) > 2
|
||||
assert len(package.get_installed_packages()) >= 2
|
||||
|
||||
Reference in New Issue
Block a user