tests.model package
Submodules
tests.model.test_base_component module
Tests for BaseComponent.
This module contains unit tests for the BaseComponent class and related functionality.
- tests.model.test_base_component.fixture_dummy_component()[source]
Fixture for a dummy BaseComponent.
- Returns:
A dummy component instance.
- Return type:
- tests.model.test_base_component.test_get_time_list_for_gantt_chart()[source]
Test getting time lists for Gantt chart visualization.
- tests.model.test_base_component.test_initialize()[source]
Test initialization/reset of error value.
- tests.model.test_base_component.test_print_mermaid_diagram(dummy_component)[source]
Test the print_mermaid_diagram method.
- Parameters:
dummy_component (BaseComponent) – The dummy component fixture.
- tests.model.test_base_component.test_remove_insert_absence_time_list()[source]
Test removing and inserting absence time list.
tests.model.test_base_facility module
Tests for BaseFacility.
This module contains unit tests for the BaseFacility class and related functionality.
- tests.model.test_base_facility.fixture_dummy_facility()[source]
Fixture for a dummy BaseFacility.
- Returns:
A dummy facility instance.
- Return type:
- tests.model.test_base_facility.test_check_update_state_from_absence_time_list()[source]
Test check_update_state_from_absence_time_list method of BaseFacility.
- tests.model.test_base_facility.test_get_time_list_for_gantt_chart()[source]
Test get_time_list_for_gantt_chart method of BaseFacility.
- tests.model.test_base_facility.test_has_workamount_skill()[source]
Test has_workamount_skill method of BaseFacility.
- tests.model.test_base_facility.test_init(dummy_facility)[source]
Test initialization of BaseFacility.
- Parameters:
dummy_facility (BaseFacility) – The dummy facility fixture.
- tests.model.test_base_facility.test_initialize()[source]
Test initialization/reset of BaseFacility.
- tests.model.test_base_facility.test_print_mermaid_diagram(dummy_facility)[source]
Test the print_mermaid_diagram method.
- Parameters:
dummy_facility (BaseFacility) – The dummy facility fixture.
tests.model.test_base_priority_rule module
Tests for base_priority_rule.
This module contains unit tests for the priority rule mechanisms in pDESy.
- tests.model.test_base_priority_rule.test_sort_task_list_est()[source]
Test sorting task list by EST rule.
- tests.model.test_base_priority_rule.test_sort_task_list_fifo()[source]
Test sorting task list by FIFO rule.
- tests.model.test_base_priority_rule.test_sort_task_list_lpt()[source]
Test sorting task list by LPT rule.
- tests.model.test_base_priority_rule.test_sort_task_list_lrpt()[source]
Test sorting task list by LRPT rule.
- tests.model.test_base_priority_rule.test_sort_task_list_spt()[source]
Test sorting task list by SPT rule.
- tests.model.test_base_priority_rule.test_sort_task_list_srpt()[source]
Test sorting task list by SRPT rule.
- tests.model.test_base_priority_rule.test_sort_task_list_tslack()[source]
Test sorting task list by TSLACK rule.
- tests.model.test_base_priority_rule.test_sort_worker_list_hsv()[source]
Test sorting worker list by HSV rule.
- tests.model.test_base_priority_rule.test_sort_worker_list_mw()[source]
Test sorting worker list by MW rule.
- tests.model.test_base_priority_rule.test_sort_worker_list_ssp()[source]
Test sorting worker list by SSP rule.
- tests.model.test_base_priority_rule.test_sort_worker_list_vc()[source]
Test sorting worker list by VC rule.
tests.model.test_base_product module
Tests for BaseProduct.
This module contains unit tests for the BaseProduct class and related functionality.
- tests.model.test_base_product.fixture_dummy_product_for_extracting()[source]
Fixture for a dummy BaseProduct for extracting tests.
- Returns:
A dummy product instance with several components.
- Return type:
- tests.model.test_base_product.test_create_component()[source]
Test creating a component from a product.
- tests.model.test_base_product.test_extract_finished_component_set(dummy_product_for_extracting)[source]
Test extracting components in FINISHED state.
- Parameters:
dummy_product_for_extracting (BaseProduct) – The dummy product fixture.
- tests.model.test_base_product.test_extract_none_component_set(dummy_product_for_extracting)[source]
Test extracting components in NONE state.
- Parameters:
dummy_product_for_extracting (BaseProduct) – The dummy product fixture.
- tests.model.test_base_product.test_extract_ready_component_set(dummy_product_for_extracting)[source]
Test extracting components in READY state.
- Parameters:
dummy_product_for_extracting (BaseProduct) – The dummy product fixture.
- tests.model.test_base_product.test_extract_working_component_set(dummy_product_for_extracting)[source]
Test extracting components in WORKING state.
- Parameters:
dummy_product_for_extracting (BaseProduct) – The dummy product fixture.
- tests.model.test_base_product.test_print_mermaid_diagram(dummy_product_for_extracting)[source]
Test printing Mermaid diagrams.
- Parameters:
dummy_product_for_extracting (BaseProduct) – The dummy product fixture.
tests.model.test_base_project module
Tests for BaseProject.
This module contains unit tests for the BaseProject class and related functionality.
- tests.model.test_base_project.fixture_dummy_auto_task_project()[source]
Fixture for a dummy auto task project.
- Returns:
A dummy project instance with an auto task.
- Return type:
- tests.model.test_base_project.fixture_dummy_conveyor_project()[source]
Fixture for a dummy conveyor project.
- Returns:
A dummy conveyor project instance.
- Return type:
- tests.model.test_base_project.fixture_dummy_conveyor_project_with_child_component()[source]
Fixture for a dummy conveyor project with child components.
- Returns:
A dummy conveyor project instance with child components.
- Return type:
- tests.model.test_base_project.fixture_dummy_place_check()[source]
Fixture for a dummy project for place checking.
- Returns:
A dummy project instance for place checking.
- Return type:
- tests.model.test_base_project.fixture_dummy_project()[source]
Fixture for a dummy BaseProject.
- Returns:
A dummy project instance with components, tasks, teams, workers, and workplaces.
- Return type:
- tests.model.test_base_project.fixture_dummy_project_multiple()[source]
Fixture for a dummy BaseProject with multiple products and workflows.
- Returns:
A dummy project instance with multiple products and workflows.
- Return type:
- tests.model.test_base_project.fixture_dummy_simple_project()[source]
Fixture for a dummy simple project.
- Returns:
A simple dummy project instance.
- Return type:
- tests.model.test_base_project.fixture_project_for_checking_space_judge()[source]
Fixture for a project for checking space judge.
- Returns:
A dummy project instance for space judge checking.
- Return type:
- tests.model.test_base_project.fixture_project_for_workload_limit()[source]
Fixture for a dummy project to check workload limit.
- Returns:
A dummy project instance.
- Return type:
- tests.model.test_base_project.test_absence_time_list_simulation(dummy_project)[source]
Test simulation with absence time list.
- Parameters:
dummy_project (BaseProject) – The dummy project fixture.
- tests.model.test_base_project.test_backward_simulate(dummy_project)[source]
Test backward simulation of BaseProject.
- Parameters:
dummy_project (BaseProject) – The dummy project fixture.
- tests.model.test_base_project.test_backward_simulate_auto_task()[source]
Test backward simulation with auto tasks.
- tests.model.test_base_project.test_component_place_check_1(dummy_conveyor_project)[source]
Test component place check 1.
- Parameters:
dummy_conveyor_project (BaseProject) – The dummy conveyor project fixture.
- tests.model.test_base_project.test_component_place_check_2(dummy_conveyor_project_with_child_component)[source]
Test component place check 2.
- Parameters:
dummy_conveyor_project_with_child_component (BaseProject) – The dummy conveyor project with child components fixture.
Test product-related mermaid diagram without initialize call.
- tests.model.test_base_project.test_init(dummy_project)[source]
Test initialization and simulation of BaseProject.
- Parameters:
dummy_project (BaseProject) – The dummy project fixture.
- tests.model.test_base_project.test_initialize(dummy_project)[source]
Test initialization/reset of BaseProject.
- Parameters:
dummy_project (BaseProject) – The dummy project fixture.
- tests.model.test_base_project.test_parent_workplace_assignment_rule(dummy_project_no_parent_workplace, dummy_project_parent_workplace)[source]
- tests.model.test_base_project.test_print_all_product_gantt_mermaid_diagram(dummy_project_multiple)[source]
Test printing all product Gantt Mermaid diagrams.
- Parameters:
dummy_project_multiple (BaseProject) – The dummy project with multiple products fixture.
- tests.model.test_base_project.test_print_all_product_mermaid_diagram(dummy_project_multiple)[source]
Test printing all product Mermaid diagrams.
- Parameters:
dummy_project_multiple (BaseProject) – The dummy project with multiple products fixture.
- tests.model.test_base_project.test_print_all_team_gantt_mermaid_diagram(dummy_project_multiple)[source]
Test printing all team Gantt Mermaid diagrams.
- Parameters:
dummy_project_multiple (BaseProject) – The dummy project with multiple products fixture.
- tests.model.test_base_project.test_print_all_team_mermaid_diagram(dummy_project_multiple)[source]
Test printing all team Mermaid diagrams.
- Parameters:
dummy_project_multiple (BaseProject) – The dummy project with multiple products fixture.
- tests.model.test_base_project.test_print_all_workflow_gantt_mermaid_diagram(dummy_project_multiple)[source]
Test printing all workflow Gantt Mermaid diagrams.
- Parameters:
dummy_project_multiple (BaseProject) – The dummy project with multiple products fixture.
- tests.model.test_base_project.test_print_all_workflow_mermaid_diagram(dummy_project_multiple)[source]
Test printing all workflow Mermaid diagrams.
- Parameters:
dummy_project_multiple (BaseProject) – The dummy project with multiple products fixture.
- tests.model.test_base_project.test_print_all_workplace_gantt_mermaid_diagram(dummy_project_multiple)[source]
Test printing all workplace Gantt Mermaid diagrams.
- Parameters:
dummy_project_multiple (BaseProject) – The dummy project with multiple products fixture.
- tests.model.test_base_project.test_print_all_workplace_mermaid_diagram(dummy_project_multiple)[source]
Test printing all workplace Mermaid diagrams.
- Parameters:
dummy_project_multiple (BaseProject) – The dummy project with multiple products fixture.
- tests.model.test_base_project.test_print_all_xxxx_gantt_mermaid_diagram(dummy_project_multiple)[source]
Test printing all Gantt Mermaid diagrams for products, workflows, teams, and workplaces.
- Parameters:
dummy_project_multiple (BaseProject) – The dummy project with multiple products fixture.
- tests.model.test_base_project.test_print_mermaid_diagram(dummy_project_multiple, dummy_conveyor_project)[source]
Test printing Mermaid diagrams.
- Parameters:
dummy_project_multiple (BaseProject) – The dummy project with multiple products fixture.
dummy_conveyor_project (BaseProject) – The dummy conveyor project fixture.
Test printing target product related Mermaid diagram.
- Parameters:
dummy_project_multiple (BaseProject) – The dummy project with multiple products fixture.
Test printing target team related Mermaid diagram.
- Parameters:
dummy_project_multiple (BaseProject) – The dummy project with multiple products fixture.
Test printing target workflow related Mermaid diagram.
- Parameters:
dummy_project_multiple (BaseProject) – The dummy project with multiple products fixture.
Test printing target workplace related Mermaid diagram.
- Parameters:
dummy_project_multiple (BaseProject) – The dummy project with multiple products fixture.
- tests.model.test_base_project.test_project_for_checking_space_judge(project_for_checking_space_judge)[source]
Test project for checking space judge.
- Parameters:
project_for_checking_space_judge (BaseProject) – The dummy project fixture.
- tests.model.test_base_project.test_set_last_datetime(dummy_project)[source]
Test setting the last datetime.
- Parameters:
dummy_project (BaseProject) – The dummy project fixture.
- tests.model.test_base_project.test_simple_project_simulate(dummy_simple_project)[source]
Test the simulation of a simple project.
- Parameters:
dummy_simple_project (BaseProject) – The dummy simple project fixture.
- tests.model.test_base_project.test_simple_write_json(dummy_project)[source]
Test writing and reading simple JSON for BaseProject.
- Parameters:
dummy_project (BaseProject) – The dummy project fixture.
- tests.model.test_base_project.test_simulate(dummy_project, dummy_project_multiple)[source]
Test simulation of BaseProject and BaseProject with multiple products.
- Parameters:
dummy_project (BaseProject) – The dummy project fixture.
dummy_project_multiple (BaseProject) – The dummy project with multiple products fixture.
- tests.model.test_base_project.test_simulate_progress_bar(dummy_auto_task_project)[source]
Test the progress bar during simulation.
- Parameters:
dummy_auto_task_project (BaseProject) – The dummy project with an auto task fixture.
- tests.model.test_base_project.test_subproject_task(dummy_project)[source]
Test the subproject task.
- Parameters:
dummy_project (BaseProject) – The dummy project fixture.
- tests.model.test_base_project.test_workload_limit(project_for_workload_limit)[source]
Test workload limit functionality.
- Parameters:
project_for_workload_limit (BaseProject) – The dummy project to check workload limit fixture.
tests.model.test_base_subproject_task module
Tests for BaseSubProjectTask.
This module contains unit tests for the BaseSubProjectTask class and related functionality.
- tests.model.test_base_subproject_task.fixture_dummy_project()[source]
Fixture for a dummy BaseProject.
- Returns:
A dummy project instance with components, tasks, teams, workers, and workplaces.
- Return type:
- tests.model.test_base_subproject_task.test_set_all_attributes_from_json(dummy_project)[source]
Test set_all_attributes_from_json method.
- Parameters:
dummy_project (BaseProject) – The dummy project fixture.
- tests.model.test_base_subproject_task.test_set_work_amount_progress_of_unit_step_time(dummy_project)[source]
Test set_work_amount_progress_of_unit_step_time method.
- Parameters:
dummy_project (BaseProject) – The dummy project fixture.
tests.model.test_base_task module
Tests for BaseTask.
This module contains unit tests for the BaseTask class and related functionality.
- tests.model.test_base_task.fixture_dummy_task()[source]
Fixture for a dummy BaseTask.
- Returns:
A dummy task instance.
- Return type:
- tests.model.test_base_task.test_get_gantt_mermaid_steps_data(dummy_task)[source]
Test the get_gantt_mermaid_steps_data method.
- Parameters:
dummy_task (BaseTask) – The dummy task fixture.
- tests.model.test_base_task.test_get_state_from_record()[source]
Test getting state from state record.
- tests.model.test_base_task.test_get_time_list_for_gantt_chart()[source]
Test getting time lists for Gantt chart visualization.
- tests.model.test_base_task.test_print_mermaid_diagram(dummy_task)[source]
Test the print_mermaid_diagram method.
- Parameters:
dummy_task (BaseTask) – The dummy task fixture.
tests.model.test_base_team module
Tests for BaseTeam.
This module contains unit tests for the BaseTeam class and related functionality.
- tests.model.test_base_team.fixture_dummy_team_for_extracting()[source]
Fixture for a dummy BaseTeam for extracting tests.
- Returns:
A dummy team instance with several workers.
- Return type:
- tests.model.test_base_team.test_add_labor_cost()[source]
Test adding labor cost to the team and its workers.
- tests.model.test_base_team.test_extract_free_worker_set(dummy_team_for_extracting)[source]
Test extracting free workers.
- Parameters:
dummy_team_for_extracting (BaseTeam) – The dummy team fixture.
- tests.model.test_base_team.test_extract_working_worker_set(dummy_team_for_extracting)[source]
Test extracting working workers.
- Parameters:
dummy_team_for_extracting (BaseTeam) – The dummy team fixture.
- tests.model.test_base_team.test_initialize()[source]
Test initialization/reset of BaseTeam and its workers.
- tests.model.test_base_team.test_print_mermaid_diagram(dummy_team_for_extracting)[source]
Test printing Mermaid diagrams.
- Parameters:
dummy_team_for_extracting (BaseTeam) – The dummy team fixture.
tests.model.test_base_worker module
Tests for BaseWorker.
This module contains unit tests for the BaseWorker class and related functionality.
- tests.model.test_base_worker.fixture_dummy_worker()[source]
Fixture for a dummy BaseWorker.
- Returns:
A dummy worker instance.
- Return type:
- tests.model.test_base_worker.test_check_update_state_from_absence_time_list()[source]
Test check_update_state_from_absence_time_list method of BaseWorker.
- tests.model.test_base_worker.test_get_quality_skill_point()[source]
Test get_quality_skill_point method of BaseWorker.
- tests.model.test_base_worker.test_get_time_list_for_gantt_chart()[source]
Test get_time_list_for_gantt_chart method of BaseWorker.
- tests.model.test_base_worker.test_has_facility_skill()[source]
Test has_facility_skill method of BaseWorker.
- tests.model.test_base_worker.test_has_quality_skill()[source]
Test has_quality_skill method of BaseWorker.
- tests.model.test_base_worker.test_has_workamount_skill()[source]
Test has_workamount_skill method of BaseWorker.
- tests.model.test_base_worker.test_init(dummy_worker)[source]
Test initialization of BaseWorker.
- Parameters:
dummy_worker (BaseWorker) – The dummy worker fixture.
- tests.model.test_base_worker.test_print_mermaid_diagram(dummy_worker)[source]
Test the print_mermaid_diagram method.
- Parameters:
dummy_worker (BaseWorker) – The dummy worker fixture.
tests.model.test_base_workflow module
Tests for BaseWorkflow.
This module contains unit tests for the BaseWorkflow class and related functionality.
- tests.model.test_base_workflow.fixture_dummy_workflow()[source]
Fixture for a dummy BaseWorkflow.
- Returns:
A dummy workflow instance.
- Return type:
- tests.model.test_base_workflow.fixture_dummy_workflow_for_extracting()[source]
Fixture for a dummy BaseWorkflow for extracting tests.
- Returns:
A dummy workflow instance with several tasks.
- Return type:
- tests.model.test_base_workflow.fixture_ff_workflow()[source]
Fixture for a simple workflow including FinishToFinish dependency.
- Returns:
A workflow with FF, FS, and SS dependencies.
- Return type:
- tests.model.test_base_workflow.fixture_sf_workflow()[source]
Fixture for a simple workflow including StartToFinish dependency.
- Returns:
A workflow with SF, FS, and SS dependencies.
- Return type:
- tests.model.test_base_workflow.fixture_ss_workflow()[source]
Fixture for a simple workflow including StartToStart dependency.
- Returns:
A workflow with SS and FS dependencies.
- Return type:
- tests.model.test_base_workflow.test_extract_finished_task_set(dummy_workflow_for_extracting)[source]
Test extracting tasks in FINISHED state.
- Parameters:
dummy_workflow_for_extracting (BaseWorkflow) – The dummy workflow fixture.
- tests.model.test_base_workflow.test_extract_none_task_set(dummy_workflow_for_extracting)[source]
Test extracting tasks in NONE state.
- Parameters:
dummy_workflow_for_extracting (BaseWorkflow) – The dummy workflow fixture.
- tests.model.test_base_workflow.test_extract_ready_task_set(dummy_workflow_for_extracting)[source]
Test extracting tasks in READY state.
- Parameters:
dummy_workflow_for_extracting (BaseWorkflow) – The dummy workflow fixture.
- tests.model.test_base_workflow.test_extract_working_task_set(dummy_workflow_for_extracting)[source]
Test extracting tasks in WORKING state.
- Parameters:
dummy_workflow_for_extracting (BaseWorkflow) – The dummy workflow fixture.
- tests.model.test_base_workflow.test_initialize()[source]
Test initialization/reset of BaseWorkflow and its tasks.
- tests.model.test_base_workflow.test_print_gantt_mermaid(dummy_workflow)[source]
Test printing Gantt Mermaid diagrams.
- Parameters:
dummy_workflow (BaseWorkflow) – The dummy workflow fixture.
- tests.model.test_base_workflow.test_print_mermaid_diagram(dummy_workflow)[source]
Test printing Mermaid diagrams.
- Parameters:
dummy_workflow (BaseWorkflow) – The dummy workflow fixture.
- tests.model.test_base_workflow.test_remove_insert_absence_time_list()[source]
Test removing and inserting absence time list for BaseWorkflow and its tasks.
- tests.model.test_base_workflow.test_reverse_dependencies(dummy_workflow)[source]
Test reversing dependencies in a workflow.
- Parameters:
dummy_workflow (BaseWorkflow) – The dummy workflow fixture.
- tests.model.test_base_workflow.test_update_pert_data(ss_workflow, ff_workflow, sf_workflow)[source]
Test updating PERT data for different dependency types.
- Parameters:
ss_workflow (BaseWorkflow) – Workflow with SS dependency.
ff_workflow (BaseWorkflow) – Workflow with FF dependency.
sf_workflow (BaseWorkflow) – Workflow with SF dependency.
tests.model.test_base_workplace module
Tests for BaseWorkplace.
This module contains unit tests for the BaseWorkplace class and related functionality.
- tests.model.test_base_workplace.fixture_dummy_team_for_extracting()[source]
Fixture for a dummy BaseWorkplace for extracting tests.
- Returns:
A dummy workplace instance with several facilities.
- Return type:
- tests.model.test_base_workplace.test_add_facility()[source]
Test adding a facility to the workplace.
- tests.model.test_base_workplace.test_add_labor_cost()[source]
Test adding labor cost to the workplace and its facilities.
- tests.model.test_base_workplace.test_create_facility()[source]
Test creating a facility from a workplace.
- tests.model.test_base_workplace.test_extract_free_facility_set(dummy_team_for_extracting)[source]
Test extracting free facilities.
- Parameters:
dummy_team_for_extracting (BaseWorkplace) – The dummy workplace fixture.
- tests.model.test_base_workplace.test_extract_working_facility_set(dummy_team_for_extracting)[source]
Test extracting working facilities.
- Parameters:
dummy_team_for_extracting (BaseWorkplace) – The dummy workplace fixture.
- tests.model.test_base_workplace.test_initialize()[source]
Test initialization/reset of BaseWorkplace and its facilities.
- tests.model.test_base_workplace.test_print_mermaid_diagram(dummy_team_for_extracting)[source]
Test printing Mermaid diagrams.
- Parameters:
dummy_team_for_extracting (BaseWorkplace) – The dummy workplace fixture.
- tests.model.test_base_workplace.test_remove_insert_absence_time_list()[source]
Test removing and inserting absence time list for BaseWorkplace and its facilities.
- tests.model.test_base_workplace.test_set_parent_workplace()[source]
Test setting the parent workplace.
Module contents
__init__.