fix: DB空文字、INPUT空文字のパターンは異常なケースなので、エラーにするようにした
This commit is contained in:
parent
cc78327472
commit
c38e3cb69e
@ -113,6 +113,9 @@ def assert_table_results(actual_rows: list[dict], expect_rows: list[dict], ignor
|
||||
elif actual_value == "0000-00-00 00:00:00" and expect_value == "":
|
||||
# DB項目(datetime)がゼロ日付(NULL代替値)の場合、期待値が""であれば"0000-00-00 00:00:00"に置換する
|
||||
expect_value = "0000-00-00 00:00:00"
|
||||
elif actual_value == "" and expect_value == "":
|
||||
# DB項目値が空文字のかつ期待値が""のパターンは想定外のパターンであるため、期待値をNoneに置換して失敗させる
|
||||
expect_value = None
|
||||
|
||||
# 検証
|
||||
assert actual_value == expect_value, f'{line_number}行目:"{actual_col_name}" : "{actual_value}" ({type(actual_value)})が、期待値 "{expect_value}" ({type(expect_value)}) と一致しませんでした'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user