def test_window_frame_specs(con, window, frame): t = con.table('alltypes') ex_template = """\ SELECT sum(`d`) OVER (ORDER BY `f` {0}) AS `foo` FROM ibis_testing.`alltypes`""" w2 = window.order_by(t.f) expr = t.projection([t.d.sum().over(w2).name('foo')]) expected = ex_template.format(frame.upper()) assert_sql_equal(expr, expected)