Skip to content

Commit 5333719

Browse files
committed
exclude tests for lower version
1 parent 4cab482 commit 5333719

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

tests/unit/core/compile/sqlglot/aggregations/test_unary_compiler.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
import sys
1516
import typing
1617

1718
import pytest
@@ -127,6 +128,10 @@ def test_dense_rank(scalar_types_df: bpd.DataFrame, snapshot):
127128

128129

129130
def test_first(scalar_types_df: bpd.DataFrame, snapshot):
131+
if sys.version_info < (3, 12):
132+
pytest.skip(
133+
"Skipping test due to inconsistent SQL formatting on Python < 3.12.",
134+
)
130135
col_name = "int64_col"
131136
bf_df = scalar_types_df[[col_name]]
132137
agg_expr = agg_exprs.UnaryAggregation(agg_ops.FirstOp(), expression.deref(col_name))
@@ -137,6 +142,10 @@ def test_first(scalar_types_df: bpd.DataFrame, snapshot):
137142

138143

139144
def test_first_non_null(scalar_types_df: bpd.DataFrame, snapshot):
145+
if sys.version_info < (3, 12):
146+
pytest.skip(
147+
"Skipping test due to inconsistent SQL formatting on Python < 3.12.",
148+
)
140149
col_name = "int64_col"
141150
bf_df = scalar_types_df[[col_name]]
142151
agg_expr = agg_exprs.UnaryAggregation(
@@ -149,6 +158,10 @@ def test_first_non_null(scalar_types_df: bpd.DataFrame, snapshot):
149158

150159

151160
def test_last(scalar_types_df: bpd.DataFrame, snapshot):
161+
if sys.version_info < (3, 12):
162+
pytest.skip(
163+
"Skipping test due to inconsistent SQL formatting on Python < 3.12.",
164+
)
152165
col_name = "int64_col"
153166
bf_df = scalar_types_df[[col_name]]
154167
agg_expr = agg_exprs.UnaryAggregation(agg_ops.LastOp(), expression.deref(col_name))
@@ -159,6 +172,10 @@ def test_last(scalar_types_df: bpd.DataFrame, snapshot):
159172

160173

161174
def test_last_non_null(scalar_types_df: bpd.DataFrame, snapshot):
175+
if sys.version_info < (3, 12):
176+
pytest.skip(
177+
"Skipping test due to inconsistent SQL formatting on Python < 3.12.",
178+
)
162179
col_name = "int64_col"
163180
bf_df = scalar_types_df[[col_name]]
164181
agg_expr = agg_exprs.UnaryAggregation(

0 commit comments

Comments
 (0)