load only en & es models (avoid to download all models)

This commit is contained in:
Sébastien Thuret 2022-04-05 16:39:31 +02:00
parent 55b05992b5
commit 7113a30a0c
No known key found for this signature in database
GPG key ID: 230B93BBA62CB043
2 changed files with 4 additions and 2 deletions

View file

@ -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

View file

@ -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