def test_parse_conf(self): ini = conf.load_script(self.filename) conf_type = conf.process_config(ini) #self.assertEqual(conf_type.username, "USER") #self.assertEqual(conf_type.password, "PASSWORD") self.assertEqual(conf_type.database, "botlist_development") self.assertEqual(conf_type.hostname, "localhost")
) level3_order_writer.clear_one_month(db_config.table_name, 'order_date', true_pred_year, true_pred_month) level3_order_writer.upsert(result, db_config.table_name, db_config.batch_size) if __name__ == '__main__': # Load & parse configuration file # ============================================================================================ # print("[INFO] Start loading & parsing configuration...") parser, config = None, None try: args, parser = get_args() # get the path of configuration file config = process_config(args.config) except Exception as e: print(e) if parser: parser.print_help() exit(0) print("[INFO] Parsing finished!") # Update forecast result of level3 inventory # ============================================================================================ # curr_year, curr_month, _ = get_curr_date() gap = 1 # 更新历史,默认预测M1月 year_upper_bound, month_upper_bound = infer_month(curr_year, curr_month, offset=-(gap + 1))