forked from mirrors/LibreTranslate
load only en & es models (avoid to download all models)
This commit is contained in:
parent
55b05992b5
commit
7113a30a0c
2 changed files with 4 additions and 2 deletions
|
@ -2,12 +2,14 @@ import sys
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
from app.app import create_app
|
from app.app import create_app
|
||||||
|
from app.default_values import DEFAULT_ARGUMENTS
|
||||||
from app.main import get_args
|
from app.main import get_args
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture()
|
@pytest.fixture()
|
||||||
def app():
|
def app():
|
||||||
sys.argv = ['']
|
sys.argv = ['']
|
||||||
|
DEFAULT_ARGUMENTS['LOAD_ONLY'] = "en,es"
|
||||||
app = create_app(get_args())
|
app = create_app(get_args())
|
||||||
|
|
||||||
yield app
|
yield app
|
||||||
|
|
|
@ -4,6 +4,6 @@ from argostranslate import package
|
||||||
|
|
||||||
def test_boot_argos():
|
def test_boot_argos():
|
||||||
"""Test Argos translate models initialization"""
|
"""Test Argos translate models initialization"""
|
||||||
boot()
|
boot(["en", "es"])
|
||||||
|
|
||||||
assert len(package.get_installed_packages()) > 2
|
assert len(package.get_installed_packages()) >= 2
|
||||||
|
|
Loading…
Reference in a new issue