Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
l8556 committed Dec 13, 2024
1 parent 6331702 commit 31b8ec1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,13 @@

class X2tTesterConversion:
TEST_ASSETS_DIR = Path(__file__).resolve().parents[3] / 'assets'
QUICK_CHECK_FILES_PATH = TEST_ASSETS_DIR / 'quick_check_files.json'
EXTENSIONS_FILE_PATH = TEST_ASSETS_DIR / 'extension_array.json'
QUICK_CHECK_FILES_PATH = str(TEST_ASSETS_DIR / 'quick_check_files.json')
EXTENSIONS_FILE_PATH = str(TEST_ASSETS_DIR / 'extension_array.json')
EXCEPTIONS_JSON = str(TEST_ASSETS_DIR / 'conversion_exception.json')

def __init__(self, test_config: X2ttesterTestConfig):
self.config = test_config
self.report = X2ttesterReport(self.config)
self.report = X2ttesterReport(self.config, exceptions_json=File.read_json(self.EXCEPTIONS_JSON))
self.x2ttester = X2tTester(config=X2tTesterConfig(**self.config.model_dump()))
self.results_handler = ResultsHandler(self.config)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# -*- coding: utf-8 -*-
import json
import os
from datetime import datetime
from os.path import join
Expand All @@ -19,7 +20,6 @@

@singleton
class X2ttesterReport(Report):
exceptions = File.read_json(join(os.getcwd(), 'tests', 'assets', 'conversion_exception.json'))
__columns_names = {
'Input file': 'Input_file',
'Output file': 'Output_file',
Expand All @@ -30,10 +30,11 @@ class X2ttesterReport(Report):
'Time': 'Time'
}

def __init__(self, test_config: X2ttesterTestConfig):
def __init__(self, test_config: X2ttesterTestConfig, exceptions_json: json):
super().__init__()
self.config = test_config
self.reports_dir = self.config.reports_dir
self.exceptions = exceptions_json
self.os = HostInfo().os

def path(self) -> str:
Expand Down

0 comments on commit 31b8ec1

Please sign in to comment.