@@ -37,6 +37,7 @@ def _apply_unary_op(obj: bpd.DataFrame, op: ops.UnaryOp, arg: str) -> str:
3737def test_arccosh (scalar_types_df : bpd .DataFrame , snapshot ):
3838 bf_df = scalar_types_df [["float64_col" ]]
3939 sql = _apply_unary_op (bf_df , ops .arccosh_op , "float64_col" )
40+
4041 snapshot .assert_match (sql , "out.sql" )
4142
4243
@@ -57,6 +58,7 @@ def test_arcsin(scalar_types_df: bpd.DataFrame, snapshot):
5758def test_arcsinh (scalar_types_df : bpd .DataFrame , snapshot ):
5859 bf_df = scalar_types_df [["float64_col" ]]
5960 sql = _apply_unary_op (bf_df , ops .arcsinh_op , "float64_col" )
61+
6062 snapshot .assert_match (sql , "out.sql" )
6163
6264
@@ -70,18 +72,21 @@ def test_arctan(scalar_types_df: bpd.DataFrame, snapshot):
7072def test_arctanh (scalar_types_df : bpd .DataFrame , snapshot ):
7173 bf_df = scalar_types_df [["float64_col" ]]
7274 sql = _apply_unary_op (bf_df , ops .arctanh_op , "float64_col" )
75+
7376 snapshot .assert_match (sql , "out.sql" )
7477
7578
7679def test_abs (scalar_types_df : bpd .DataFrame , snapshot ):
7780 bf_df = scalar_types_df [["float64_col" ]]
7881 sql = _apply_unary_op (bf_df , ops .abs_op , "float64_col" )
82+
7983 snapshot .assert_match (sql , "out.sql" )
8084
8185
8286def test_capitalize (scalar_types_df : bpd .DataFrame , snapshot ):
8387 bf_df = scalar_types_df [["string_col" ]]
8488 sql = _apply_unary_op (bf_df , ops .capitalize_op , "string_col" )
89+
8590 snapshot .assert_match (sql , "out.sql" )
8691
8792
@@ -94,42 +99,49 @@ def test_ceil(scalar_types_df: bpd.DataFrame, snapshot):
9499def test_date (scalar_types_df : bpd .DataFrame , snapshot ):
95100 bf_df = scalar_types_df [["timestamp_col" ]]
96101 sql = _apply_unary_op (bf_df , ops .date_op , "timestamp_col" )
102+
97103 snapshot .assert_match (sql , "out.sql" )
98104
99105
100106def test_day (scalar_types_df : bpd .DataFrame , snapshot ):
101107 bf_df = scalar_types_df [["timestamp_col" ]]
102108 sql = _apply_unary_op (bf_df , ops .day_op , "timestamp_col" )
109+
103110 snapshot .assert_match (sql , "out.sql" )
104111
105112
106113def test_dayofweek (scalar_types_df : bpd .DataFrame , snapshot ):
107114 bf_df = scalar_types_df [["timestamp_col" ]]
108115 sql = _apply_unary_op (bf_df , ops .dayofweek_op , "timestamp_col" )
116+
109117 snapshot .assert_match (sql , "out.sql" )
110118
111119
112120def test_dayofyear (scalar_types_df : bpd .DataFrame , snapshot ):
113121 bf_df = scalar_types_df [["timestamp_col" ]]
114122 sql = _apply_unary_op (bf_df , ops .dayofyear_op , "timestamp_col" )
123+
115124 snapshot .assert_match (sql , "out.sql" )
116125
117126
118127def test_exp (scalar_types_df : bpd .DataFrame , snapshot ):
119128 bf_df = scalar_types_df [["float64_col" ]]
120129 sql = _apply_unary_op (bf_df , ops .exp_op , "float64_col" )
130+
121131 snapshot .assert_match (sql , "out.sql" )
122132
123133
124134def test_expm1 (scalar_types_df : bpd .DataFrame , snapshot ):
125135 bf_df = scalar_types_df [["float64_col" ]]
126136 sql = _apply_unary_op (bf_df , ops .expm1_op , "float64_col" )
137+
127138 snapshot .assert_match (sql , "out.sql" )
128139
129140
130141def test_floor (scalar_types_df : bpd .DataFrame , snapshot ):
131142 bf_df = scalar_types_df [["float64_col" ]]
132143 sql = _apply_unary_op (bf_df , ops .floor_op , "float64_col" )
144+
133145 snapshot .assert_match (sql , "out.sql" )
134146
135147
@@ -171,6 +183,7 @@ def test_cos(scalar_types_df: bpd.DataFrame, snapshot):
171183def test_cosh (scalar_types_df : bpd .DataFrame , snapshot ):
172184 bf_df = scalar_types_df [["float64_col" ]]
173185 sql = _apply_unary_op (bf_df , ops .cosh_op , "float64_col" )
186+
174187 snapshot .assert_match (sql , "out.sql" )
175188
176189
@@ -219,6 +232,7 @@ def test_tan(scalar_types_df: bpd.DataFrame, snapshot):
219232def test_tanh (scalar_types_df : bpd .DataFrame , snapshot ):
220233 bf_df = scalar_types_df [["float64_col" ]]
221234 sql = _apply_unary_op (bf_df , ops .tanh_op , "float64_col" )
235+
222236 snapshot .assert_match (sql , "out.sql" )
223237
224238
0 commit comments