# Path: rebasehelper/results_store.py
# class ResultsStore:
#     """Class for storing information about results from rebase-helper actions."""
# 
#     RESULTS_INFORMATION: str = 'information'
#     RESULTS_CHECKERS: str = 'checkers'
#     RESULTS_BUILD_LOG_HOOKS: str = 'build_log_hooks'
#     RESULTS_BUILDS: str = 'builds'
#     RESULTS_PATCHES: str = 'patches'
#     RESULTS_CHANGES_PATCH: str = 'changes_patch'
#     RESULTS_SUCCESS: str = 'result'
# 
#     def __init__(self):
#         self._data_store: Dict[str, Any] = dict()
# 
#     def clear(self):
#         self._data_store.clear()
# 
#     def set_results(self, results_type, data_dict):
#         if results_type not in (
#                 self.RESULTS_INFORMATION,
#                 self.RESULTS_CHECKERS,
#                 self.RESULTS_BUILD_LOG_HOOKS,
#                 self.RESULTS_BUILDS,
#                 self.RESULTS_PATCHES,
#                 self.RESULTS_CHANGES_PATCH,
#                 self.RESULTS_SUCCESS
#         ):
#             raise ValueError('Trying to set unsupported type of results: {}!'.format(results_type))
# 
#         try:
#             dict_to_update = self._data_store[results_type]
#         except KeyError:
#             dict_to_update = dict()
#             self._data_store[results_type] = dict_to_update
#         dict_to_update.update(data_dict)
# 
#     def set_info_text(self, text, data):
#         self.set_results(self.RESULTS_INFORMATION, {text: data})
# 
#     def set_patches_results(self, results_dict):
#         self.set_results(self.RESULTS_PATCHES, results_dict)
# 
#     def set_checker_output(self, text, data):
#         self.set_results(self.RESULTS_CHECKERS, {text: data})
# 
#     def set_build_log_hooks_result(self, text, data):
#         self.set_results(self.RESULTS_BUILD_LOG_HOOKS, {text: data})
# 
#     def set_build_data(self, version, data):
#         self.set_results(self.RESULTS_BUILDS, {version: data})
# 
#     def set_changes_patch(self, text, data):
#         self.set_results(self.RESULTS_CHANGES_PATCH, {text: data})
# 
#     def set_result_message(self, text, data):
#         self.set_results(self.RESULTS_SUCCESS, {text: data})
# 
#     def get_all(self):
#         return copy.deepcopy(self._data_store)
# 
#     def get_build(self, version):
#         builds_results = self._data_store.get(self.RESULTS_BUILDS, None)
#         if builds_results is not None:
#             return builds_results.get(version, None)
#         else:
#             return None
# 
#     def get_old_build(self):
#         return self.get_build('old')
# 
#     def get_new_build(self):
#         return self.get_build('new')
# 
#     def get_patches(self):
#         return self._data_store.get(self.RESULTS_PATCHES, None)
# 
#     def get_checkers(self):
#         return self._data_store.get(self.RESULTS_CHECKERS, {})
# 
#     def get_build_log_hooks(self):
#         return self._data_store.get(self.RESULTS_BUILD_LOG_HOOKS, {})
# 
#     def get_summary_info(self):
#         return self._data_store.get(self.RESULTS_INFORMATION, None)
# 
#     def get_changes_patch(self):
#         return self._data_store.get(self.RESULTS_CHANGES_PATCH, None)
# 
#     def get_result_message(self):
#         return self._data_store.get(self.RESULTS_SUCCESS, None)


import pytest  # type: ignore
from typing import Dict, List, Union
from rebasehelper.results_store import ResultsStore
#
# Authors: Petr Hráček <phracek@redhat.com>
#          Tomáš Hozza <thozza@redhat.com>
#          Nikola Forró <nforro@redhat.com>
#          František Nečas <fifinecas@seznam.cz>





class TestResultsStore:
    old_rpm_data: Dict[str, Union[str, List[str]]] = {
        'rpm': ['rpm-0.1.0.x86_64.rpm', ' rpm-devel-0.1.0.x86_64.rpm'],
        'srpm': 'rpm-0.1.0.src.rpm',
        'logs': ['logfile1.log', 'logfile2.log']
    }
    new_rpm_data: Dict[str, Union[str, List[str]]] = {
        'rpm': ['rpm-0.2.0.x86_64.rpm', ' rpm-devel-0.2.0.x86_64.rpm'],
        'srpm': 'rpm-0.2.0.src.rpm',
        'logs': ['logfile3.log', 'logfile4.log']
    }
    patches_data: Dict[str, List[str]] = {
        'deleted': ['del_patch1.patch', 'del_patch2.patch'],
        'modified': ['mod_patch1.patch', 'mod_patch2.patch']
    }
    info_data: Dict[str, str] = {'Information text': 'some information text'}
    info_data2: Dict[str, str] = {'Next Information': 'some another information text'}

    @pytest.fixture
    def results_store(self):

# Path: rebasehelper/results_store.py
# class ResultsStore:
#     """Class for storing information about results from rebase-helper actions."""
# 
#     RESULTS_INFORMATION: str = 'information'
#     RESULTS_CHECKERS: str = 'checkers'
#     RESULTS_BUILD_LOG_HOOKS: str = 'build_log_hooks'
#     RESULTS_BUILDS: str = 'builds'
#     RESULTS_PATCHES: str = 'patches'
#     RESULTS_CHANGES_PATCH: str = 'changes_patch'
#     RESULTS_SUCCESS: str = 'result'
# 
#     def __init__(self):
#         self._data_store: Dict[str, Any] = dict()
# 
#     def clear(self):
#         self._data_store.clear()
# 
#     def set_results(self, results_type, data_dict):
#         if results_type not in (
#                 self.RESULTS_INFORMATION,
#                 self.RESULTS_CHECKERS,
#                 self.RESULTS_BUILD_LOG_HOOKS,
#                 self.RESULTS_BUILDS,
#                 self.RESULTS_PATCHES,
#                 self.RESULTS_CHANGES_PATCH,
#                 self.RESULTS_SUCCESS
#         ):
#             raise ValueError('Trying to set unsupported type of results: {}!'.format(results_type))
# 
#         try:
#             dict_to_update = self._data_store[results_type]
#         except KeyError:
#             dict_to_update = dict()
#             self._data_store[results_type] = dict_to_update
#         dict_to_update.update(data_dict)
# 
#     def set_info_text(self, text, data):
#         self.set_results(self.RESULTS_INFORMATION, {text: data})
# 
#     def set_patches_results(self, results_dict):
#         self.set_results(self.RESULTS_PATCHES, results_dict)
# 
#     def set_checker_output(self, text, data):
#         self.set_results(self.RESULTS_CHECKERS, {text: data})
# 
#     def set_build_log_hooks_result(self, text, data):
#         self.set_results(self.RESULTS_BUILD_LOG_HOOKS, {text: data})
# 
#     def set_build_data(self, version, data):
#         self.set_results(self.RESULTS_BUILDS, {version: data})
# 
#     def set_changes_patch(self, text, data):
#         self.set_results(self.RESULTS_CHANGES_PATCH, {text: data})
# 
#     def set_result_message(self, text, data):
#         self.set_results(self.RESULTS_SUCCESS, {text: data})
# 
#     def get_all(self):
#         return copy.deepcopy(self._data_store)
# 
#     def get_build(self, version):
#         builds_results = self._data_store.get(self.RESULTS_BUILDS, None)
#         if builds_results is not None:
#             return builds_results.get(version, None)
#         else:
#             return None
# 
#     def get_old_build(self):
#         return self.get_build('old')
# 
#     def get_new_build(self):
#         return self.get_build('new')
# 
#     def get_patches(self):
#         return self._data_store.get(self.RESULTS_PATCHES, None)
# 
#     def get_checkers(self):
#         return self._data_store.get(self.RESULTS_CHECKERS, {})
# 
#     def get_build_log_hooks(self):
#         return self._data_store.get(self.RESULTS_BUILD_LOG_HOOKS, {})
# 
#     def get_summary_info(self):
#         return self._data_store.get(self.RESULTS_INFORMATION, None)
# 
#     def get_changes_patch(self):
#         return self._data_store.get(self.RESULTS_CHANGES_PATCH, None)
# 
#     def get_result_message(self):
#         return self._data_store.get(self.RESULTS_SUCCESS, None)


# Path: rebasehelper/tests/test_results_store.py
import pytest  # type: ignore
from typing import Dict, List, Union
from rebasehelper.results_store import ResultsStore

#
# Authors: Petr Hráček <phracek@redhat.com>
#          Tomáš Hozza <thozza@redhat.com>
#          Nikola Forró <nforro@redhat.com>
#          František Nečas <fifinecas@seznam.cz>





class TestResultsStore:
    old_rpm_data: Dict[str, Union[str, List[str]]] = {
        'rpm': ['rpm-0.1.0.x86_64.rpm', ' rpm-devel-0.1.0.x86_64.rpm'],
        'srpm': 'rpm-0.1.0.src.rpm',
        'logs': ['logfile1.log', 'logfile2.log']
    }
    new_rpm_data: Dict[str, Union[str, List[str]]] = {
        'rpm': ['rpm-0.2.0.x86_64.rpm', ' rpm-devel-0.2.0.x86_64.rpm'],
        'srpm': 'rpm-0.2.0.src.rpm',
        'logs': ['logfile3.log', 'logfile4.log']
    }
    patches_data: Dict[str, List[str]] = {
        'deleted': ['del_patch1.patch', 'del_patch2.patch'],
        'modified': ['mod_patch1.patch', 'mod_patch2.patch']
    }
    info_data: Dict[str, str] = {'Information text': 'some information text'}
    info_data2: Dict[str, str] = {'Next Information': 'some another information text'}

    @pytest.fixture
    def results_store(self):

        rs = ResultsStore()