Exemple #1
0
def _test_expr(func, **dfs):
    con = ibis.pandas.connect(dfs)
    kwargs = {k: con.table(k) for k in dfs.keys()}
    expected = func(**kwargs).execute()

    lkwargs = {k: LazyIbisObject(k) for k in dfs.keys()}
    expr = func(**lkwargs)
    actual = materialize(expr, lambda k: kwargs[k]).execute()

    _df_eq(PandasDataFrame(actual), PandasDataFrame(expected), throw=True)
Exemple #2
0
def assert_eq(df1: DataFrame, df2: DataFrame) -> None:
    _df_eq(df1, df2, throw=True)
Exemple #3
0
 def process(self, dfs: DataFrames) -> None:
     assert_or_throw(
         len(dfs) > 1, FugueWorkflowError("can't accept single input"))
     expected = dfs[0]
     for i in range(1, len(dfs)):
         assert not _df_eq(expected, dfs[i], throw=False, **self.params)