Skip to content

Commit b274a54

Browse files
authored
Fix: normalize both lists and ndarrays when generating unit tests (#2388)
1 parent ab8bdcb commit b274a54

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sqlmesh/core/test/definition.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -590,7 +590,7 @@ def _raise_error(msg: str, path: Path | None = None) -> None:
590590

591591
def _normalize_dataframe(value: t.Any) -> t.Any:
592592
"""Normalize data in a pandas dataframe so ruamel and sqlglot can deal with it."""
593-
if isinstance(value, np.ndarray):
593+
if isinstance(value, (list, np.ndarray)):
594594
return [_normalize_dataframe(v) for v in value]
595595
if isinstance(value, dict):
596596
if "key" in value and "value" in value:

0 commit comments

Comments
 (0)