From 98b9720a4372f1adbd518d60968ebc2a781da562 Mon Sep 17 00:00:00 2001 From: Reshetnikov_AS Date: Mon, 26 Feb 2024 23:58:38 +0400 Subject: [PATCH] python -m unittests --- .tests/ci-test-run.sh | 2 ++ _AutoinstallCreator/test_update.py | 8 +++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.tests/ci-test-run.sh b/.tests/ci-test-run.sh index facd3b7e..a012c48c 100755 --- a/.tests/ci-test-run.sh +++ b/.tests/ci-test-run.sh @@ -8,4 +8,6 @@ set -e "$dp0/test-tools.sh" || exit 1 +python -m unittests || exit 1 + "$dp0/test-run.sh" -- testInternalCreate || exit 1 diff --git a/_AutoinstallCreator/test_update.py b/_AutoinstallCreator/test_update.py index 54b3c1b3..4ac2b1db 100644 --- a/_AutoinstallCreator/test_update.py +++ b/_AutoinstallCreator/test_update.py @@ -2,16 +2,22 @@ import pathlib import shutil import subprocess +import sys import unittest -from _AutoinstallCreator import io_tools _self_path: str = os.path.dirname(os.path.realpath(__file__)) + _self_tmp_path: str = os.path.join(_self_path, '.tmp') _root_path: str = os.path.dirname(_self_path) _tools_path: str = os.path.join(_root_path, '.tools') busybox_exe_path: str = os.path.join(_tools_path, 'busybox.exe') +if _root_path not in sys.path: + sys.path.append(_root_path) + +from _AutoinstallCreator import io_tools + def get_version_from_stdout(b_stdout: bytes) -> str: for b_line in b_stdout.splitlines():