From 411a184f2a8f1fe52d3abb150ceaf6dbb9378622 Mon Sep 17 00:00:00 2001 From: l02 Date: Fri, 13 Dec 2024 13:35:34 +0300 Subject: [PATCH] . --- frameworks/editors/onlyoffice/x2ttester/X2tTesterConfig.py | 4 ++-- tests/conversion_tests/__init__.py | 3 +-- .../x2ttester_conversion/x2ttester_report.py | 6 ++---- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/frameworks/editors/onlyoffice/x2ttester/X2tTesterConfig.py b/frameworks/editors/onlyoffice/x2ttester/X2tTesterConfig.py index 3ce599a8..7bed71b5 100644 --- a/frameworks/editors/onlyoffice/x2ttester/X2tTesterConfig.py +++ b/frameworks/editors/onlyoffice/x2ttester/X2tTesterConfig.py @@ -11,9 +11,9 @@ class X2tTesterConfig(BaseModel): output_dir: str core_dir: str report_path: str - fonts_dir: Optional[str] = None + timeout: int cores: int = 1 - timeout: Optional[int] = None + fonts_dir: Optional[str] = None timestamp: bool = True delete: bool = False errors_only: bool = False diff --git a/tests/conversion_tests/__init__.py b/tests/conversion_tests/__init__.py index 72694801..e246b1db 100644 --- a/tests/conversion_tests/__init__.py +++ b/tests/conversion_tests/__init__.py @@ -1,3 +1,2 @@ # -*- coding: utf-8 -*- -from .x2ttester_conversion import X2ttesterTestConfig -from .x2ttester_conversion import X2tTesterConversion +from .x2ttester_conversion import X2ttesterTestConfig, X2tTesterConversion diff --git a/tests/conversion_tests/x2ttester_conversion/x2ttester_report.py b/tests/conversion_tests/x2ttester_conversion/x2ttester_report.py index b9c59e9d..6db8ad3a 100644 --- a/tests/conversion_tests/x2ttester_conversion/x2ttester_report.py +++ b/tests/conversion_tests/x2ttester_conversion/x2ttester_report.py @@ -33,9 +33,7 @@ class X2ttesterReport(Report): def __init__(self, test_config: X2ttesterTestConfig): super().__init__() self.config = test_config - self.reports_dir = test_config.reports_dir - self.tmp_dir = test_config.tmp_dir - self.errors_only: bool = test_config.errors_only + self.reports_dir = self.config.reports_dir self.os = HostInfo().os def path(self) -> str: @@ -88,7 +86,7 @@ def _rename_report_for_tg(self, report_path: str, new_name: str) -> str: return new_path def _errors_list(self, df) -> list: - errors = df[df.Output_size == 0.0] if not self.errors_only else df + errors = df[df.Output_size == 0.0] if not self.config.errors_only else df mask = (errors.BugInfo == 0) return errors.loc[mask, 'Input_file'].unique().tolist()