Tests¶
unittests Module¶
- class machine_simulation.tests.unittests.TestComponentStock(methodName='runTest')¶
Bases: unittest.case.TestCase
Tests whether ComponentStock behaves like (S-1,S) inventory system and tests the inventory holding costs
- setUp()¶
- test_empty_stock()¶
Tests whether stock behaves correctly when out-of-stock
- test_inventory()¶
Tests whether inventory holding costs are accounted for
- test_multiple_get()¶
Tests whether stock is refilled after multiple items have been retrieved
- test_single_get()¶
Check whether stock is refilled after an item has been retrieved
- class machine_simulation.tests.unittests.TestMachine(methodName='runTest')¶
Bases: unittest.case.TestCase
Tests Machine class
- setUp()¶
- test_policy_a()¶
Tests situation where module is replaced when first part is broken
- test_policy_b()¶
Tests situation where module is replaced when second part is broken
- test_policy_c()¶
Tests situation where module is always replaced
- test_policy_o()¶
Tests situation where part always gets replaced
integrationtests Module¶
- class machine_simulation.tests.integrationtests.IntegrationTest(methodName='runTest')¶
Bases: unittest.case.TestCase
Test boundary cases
- setUp()¶
Sets up machine with module consisting of 2 parts with non-zero inventory holding costs and non-zero purchase costs
- test_zero_maintenance_men()¶
Succeeds if a Factory with 0 maintenance men will have only inventory holding costs