def get_git_folders(self) -> List[Path]: return [get_files_folder().joinpath('git')]
def get_resource_folders(self) -> List[Path]: return [get_files_folder().joinpath('resources')]
def get_scripts_folder(self) -> Path: return get_files_folder().joinpath('scripts')
def get_dataset_folders(self) -> List[Path]: return [get_files_folder().joinpath('datasets')]
import os from unittest import mock from unittest.mock import patch, mock_open import pytest from tests.integration.loader_mock import get_files_folder from tests.integration.utils import run_commander, get_test_context _expected_list_messages = [ file for file in os.listdir(get_files_folder().joinpath('scripts')) ] _expected_read_messages = [ 'add package scripttest', 'import testAutoId_unpackaged --in scripttest', 'add package otherpackage' ] _history_lines = ['add user henk', 'add group test', 'make henk test_viewer'] @pytest.mark.integration def test_script_list(caplog): run_commander('script --list') assert caplog.messages == _expected_list_messages @pytest.mark.integration def test_script_read(caplog): run_commander('script --read test_script') assert caplog.messages == _expected_read_messages