From 7113a30a0c932ea5c24ad7ceee0a5a386af1b682 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Thuret?= Date: Tue, 5 Apr 2022 16:39:31 +0200 Subject: [PATCH] load only en & es models (avoid to download all models) --- tests/test_api/conftest.py | 2 ++ tests/test_init.py | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/test_api/conftest.py b/tests/test_api/conftest.py index 3fc54aa..8ce03d1 100644 --- a/tests/test_api/conftest.py +++ b/tests/test_api/conftest.py @@ -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 diff --git a/tests/test_init.py b/tests/test_init.py index c1dbfe1..dacffef 100644 --- a/tests/test_init.py +++ b/tests/test_init.py @@ -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