# Path: nimoy/runner/spec_executor.py
# class SpecExecutor:
#     def __init__(self, execution_framework) -> None:
#         super().__init__()
#         self.execution_framework = execution_framework
# 
#     def execute(self, specs):
#         for spec_metadata in specs:
#             spec_class_module = spec_metadata.owning_module
# 
#             for spec_feature in spec_metadata.features:
#                 self.execution_framework.append_test(spec_class_module(spec_feature))
# 
#         return self.execution_framework.run()
# 
# Path: nimoy/specification.py
# class Specification(TestCase, metaclass=DataDrivenSpecification):
# 
#     def __init__(self, methodName='runTest'):
#         super().__init__(methodName)
#         self.thrown_exceptions = []
# 
#     def _feature_block_context(self, block_name):
#         return FeatureBlock(block_name, self.thrown_exceptions)
# 
#     def _compare(self, left, right, comparison_type_name):
#         Compare().compare(left, right, comparison_type_name)
# 
#     def _power_assert(self, expression: Dict):
#         PowerAssertions().assert_and_raise(expression)
# 
#     def _assert_mock(self, number_of_invocations, mock, method, *args):
#         MockAssertions().assert_mock(number_of_invocations, mock, method, *args)
# 
#     def _exception_thrown(self, expected_exception_type):
#         return ExceptionAssertions().assert_exception(self.thrown_exceptions, expected_exception_type)


from unittest.mock import Mock
from nimoy.runner.spec_executor import SpecExecutor
from nimoy.specification import Specification



class SpecificationExecutorSpec(Specification):
    def execution(self):
        with given:
            execution_framework_mock = Mock()

            spec_mock = Mock()

            spec_feature_stub = {}
            module_mock = Mock(return_value=spec_feature_stub)

            spec_mock.owning_module = module_mock
            spec_mock.features = ['spec_feature']

        with when:

# Path: nimoy/runner/spec_executor.py
# class SpecExecutor:
#     def __init__(self, execution_framework) -> None:
#         super().__init__()
#         self.execution_framework = execution_framework
# 
#     def execute(self, specs):
#         for spec_metadata in specs:
#             spec_class_module = spec_metadata.owning_module
# 
#             for spec_feature in spec_metadata.features:
#                 self.execution_framework.append_test(spec_class_module(spec_feature))
# 
#         return self.execution_framework.run()
# 
# Path: nimoy/specification.py
# class Specification(TestCase, metaclass=DataDrivenSpecification):
# 
#     def __init__(self, methodName='runTest'):
#         super().__init__(methodName)
#         self.thrown_exceptions = []
# 
#     def _feature_block_context(self, block_name):
#         return FeatureBlock(block_name, self.thrown_exceptions)
# 
#     def _compare(self, left, right, comparison_type_name):
#         Compare().compare(left, right, comparison_type_name)
# 
#     def _power_assert(self, expression: Dict):
#         PowerAssertions().assert_and_raise(expression)
# 
#     def _assert_mock(self, number_of_invocations, mock, method, *args):
#         MockAssertions().assert_mock(number_of_invocations, mock, method, *args)
# 
#     def _exception_thrown(self, expected_exception_type):
#         return ExceptionAssertions().assert_exception(self.thrown_exceptions, expected_exception_type)


# Path: specs/nimoy/runner/specification_executor_spec.py
from unittest.mock import Mock
from nimoy.runner.spec_executor import SpecExecutor
from nimoy.specification import Specification




class SpecificationExecutorSpec(Specification):
    def execution(self):
        with given:
            execution_framework_mock = Mock()

            spec_mock = Mock()

            spec_feature_stub = {}
            module_mock = Mock(return_value=spec_feature_stub)

            spec_mock.owning_module = module_mock
            spec_mock.features = ['spec_feature']

        with when:

            SpecExecutor(execution_framework_mock).execute([spec_mock])