| from config.logger import logger |
| import pandas as pd |
|
|
| class Test: |
| def __init__(self): |
| return |
| |
| def test_category_matching(self, category_df, dish_df): |
| |
| pass_check = True |
| cat_uniques = category_df['カテゴリ名(日本語)'].dropna().unique() |
| dish_uniques = dish_df['カテゴリ名(日本語)'].dropna().unique() |
|
|
| for i in cat_uniques: |
| if i not in dish_uniques: |
| logger.warning(f'マスターカテゴリータブの中で料理タブに存在しないカテゴリーが入ってます: {i}') |
| |
|
|
| for i in dish_uniques: |
| if i not in cat_uniques: |
| logger.warning(f'料理タブの中でマスターカテゴリータブに存在しないカテゴリーが入ってます: {i}') |
| pass_check = False |
|
|
| return pass_check |
|
|