@@ -31,49 +31,65 @@ def make_df(values: list) -> daft.DataFrame:
3131
3232def test_last_value_rejected_in_global_agg ():
3333 df = daft .from_pydict ({"x" : [1 , 2 , 3 ]})
34- with pytest .raises (DaftCoreException , match = "Expressions in aggregations must be composed of non-nested aggregation expressions" ):
34+ with pytest .raises (
35+ DaftCoreException , match = "Expressions in aggregations must be composed of non-nested aggregation expressions"
36+ ):
3537 df .agg (col ("x" ).last_value ())
3638
3739
3840def test_last_value_standalone_rejected_in_global_agg ():
3941 df = daft .from_pydict ({"x" : [1 , 2 , 3 ]})
40- with pytest .raises (DaftCoreException , match = "Expressions in aggregations must be composed of non-nested aggregation expressions" ):
42+ with pytest .raises (
43+ DaftCoreException , match = "Expressions in aggregations must be composed of non-nested aggregation expressions"
44+ ):
4145 df .agg (last_value (col ("x" )))
4246
4347
4448def test_first_value_rejected_in_global_agg ():
4549 df = daft .from_pydict ({"x" : [1 , 2 , 3 ]})
46- with pytest .raises (DaftCoreException , match = "Expressions in aggregations must be composed of non-nested aggregation expressions" ):
50+ with pytest .raises (
51+ DaftCoreException , match = "Expressions in aggregations must be composed of non-nested aggregation expressions"
52+ ):
4753 df .agg (col ("x" ).first_value ())
4854
4955
5056def test_first_value_standalone_rejected_in_global_agg ():
5157 df = daft .from_pydict ({"x" : [1 , 2 , 3 ]})
52- with pytest .raises (DaftCoreException , match = "Expressions in aggregations must be composed of non-nested aggregation expressions" ):
58+ with pytest .raises (
59+ DaftCoreException , match = "Expressions in aggregations must be composed of non-nested aggregation expressions"
60+ ):
5361 df .agg (first_value (col ("x" )))
5462
5563
5664def test_last_value_rejected_in_groupby_agg ():
5765 df = daft .from_pydict ({"x" : [1 , 2 , 3 ], "g" : ["a" , "b" , "a" ]})
58- with pytest .raises (DaftCoreException , match = "Expressions in aggregations must be composed of non-nested aggregation expressions" ):
66+ with pytest .raises (
67+ DaftCoreException , match = "Expressions in aggregations must be composed of non-nested aggregation expressions"
68+ ):
5969 df .groupby ("g" ).agg (col ("x" ).last_value ())
6070
6171
6272def test_last_value_standalone_rejected_in_groupby_agg ():
6373 df = daft .from_pydict ({"x" : [1 , 2 , 3 ], "g" : ["a" , "b" , "a" ]})
64- with pytest .raises (DaftCoreException , match = "Expressions in aggregations must be composed of non-nested aggregation expressions" ):
74+ with pytest .raises (
75+ DaftCoreException , match = "Expressions in aggregations must be composed of non-nested aggregation expressions"
76+ ):
6577 df .groupby ("g" ).agg (last_value (col ("x" )))
6678
6779
6880def test_first_value_rejected_in_groupby_agg ():
6981 df = daft .from_pydict ({"x" : [1 , 2 , 3 ], "g" : ["a" , "b" , "a" ]})
70- with pytest .raises (DaftCoreException , match = "Expressions in aggregations must be composed of non-nested aggregation expressions" ):
82+ with pytest .raises (
83+ DaftCoreException , match = "Expressions in aggregations must be composed of non-nested aggregation expressions"
84+ ):
7185 df .groupby ("g" ).agg (col ("x" ).first_value ())
7286
7387
7488def test_first_value_standalone_rejected_in_groupby_agg ():
7589 df = daft .from_pydict ({"x" : [1 , 2 , 3 ], "g" : ["a" , "b" , "a" ]})
76- with pytest .raises (DaftCoreException , match = "Expressions in aggregations must be composed of non-nested aggregation expressions" ):
90+ with pytest .raises (
91+ DaftCoreException , match = "Expressions in aggregations must be composed of non-nested aggregation expressions"
92+ ):
7793 df .groupby ("g" ).agg (first_value (col ("x" )))
7894
7995
0 commit comments