def test_file_path_extension_col(self): # arrange, act app_dir = os.path.dirname(__file__, ) rel_path = 'supplychainpy/test.tt' abs_file_path = os.path.abspath(os.path.join(app_dir, '..', rel_path)) # assert with self.assertRaises(expected_exception=Exception): d = model_inventory.analyse_orders_from_file_col(abs_file_path, 1.28, 400, file_type="text")
def test_standard_deviation_col_count_csv(self): d = model_inventory.analyse_orders_from_file_col(ABS_FILE_PATH['PARTIAL_COL_CSV_SM'], 'RX9304-43', reorder_cost=Decimal(45), unit_cost=Decimal(400), lead_time=Decimal(45), z_value=Decimal(1.28), file_type="csv", retail_price=Decimal(30)) self.assertEqual(len(d), 19)
def test_standard_deviation_col_count_csv(self): # arrange app_dir = os.path.dirname(__file__, ) rel_path = 'supplychainpy/data_col.csv' abs_file_path = os.path.abspath(os.path.join(app_dir, '..', rel_path)) # act d = model_inventory.analyse_orders_from_file_col(abs_file_path, 'RX9304-43', 2, 400, 45, 1.28, file_type="csv") # assert self.assertEqual(len(d), 11)
def test_standard_deviation_col_count(self): # arrange, act app_dir = os.path.dirname(__file__, ) rel_path = 'supplychainpy/test.txt' abs_file_path = os.path.abspath(os.path.join(app_dir, '..', rel_path)) d = model_inventory.analyse_orders_from_file_col(abs_file_path, 'RX9304-43', Decimal(2), Decimal(400), Decimal(45), Decimal(1.28), file_type="text") # assert self.assertEqual(len(d), 11)
def test_standard_deviation_col_value(self): # arrange app_dir = os.path.dirname(__file__, ) rel_path = 'supplychainpy/test.txt' abs_file_path = os.path.abspath(os.path.join(app_dir, '..', rel_path)) # act d = model_inventory.analyse_orders_from_file_col(abs_file_path, 'RX9304-43', 2, 400, 45, 1.28, file_type="text") # assert self.assertEqual(Decimal(d.get('standard_deviation')), 25)
def test_standard_deviation_col_count(self): d = model_inventory.analyse_orders_from_file_col(file_path=ABS_FILE_PATH['PARTIAL_COL_TXT_SM'], sku_id='RX9304-43', lead_time=Decimal(2), unit_cost=Decimal(400), reorder_cost=Decimal(45), z_value=Decimal(1.28), file_type="text", retail_price=Decimal(30)) print(d) self.assertEqual(len(d), 19)
def test_standard_deviation_col_value(self): d = model_inventory.analyse_orders_from_file_col(file_path=ABS_FILE_PATH['PARTIAL_COL_TXT_SM'], sku_id='RX9304-43', reorder_cost=Decimal(45), unit_cost=Decimal(400), lead_time=Decimal(45), z_value=Decimal(1.28), file_type="text", retail_price=Decimal(30)) # assert self.assertEqual(Decimal(d.get('standard_deviation')), 25)
def test_standard_deviation_col_count_csv(self): # arrange app_dir = os.path.dirname(__file__, ) rel_path = 'supplychainpy/data_col.csv' abs_file_path = os.path.abspath(os.path.join(app_dir, '..', rel_path)) # act d = model_inventory.analyse_orders_from_file_col(abs_file_path, 'RX9304-43', reorder_cost=Decimal(45), unit_cost=Decimal(400), lead_time=Decimal(45), z_value=Decimal(1.28), file_type="csv", retail_price=Decimal(30)) # assert self.assertEqual(len(d), 18)
def test_standard_deviation_col_count(self): # arrange, act app_dir = os.path.dirname(__file__, ) rel_path = 'supplychainpy/test.txt' abs_file_path = os.path.abspath(os.path.join(app_dir, '..', rel_path)) d = model_inventory.analyse_orders_from_file_col(file_path=abs_file_path, sku_id='RX9304-43', lead_time=Decimal(2), unit_cost=Decimal(400), reorder_cost=Decimal(45), z_value=Decimal(1.28), file_type="text", retail_price=Decimal(30)) # assert print(d) self.assertEqual(len(d), 18)