Skip to content

Commit

Permalink
Update sa14:scripts to ignore feature_v20 from execution
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-jmartinezramirez committed Nov 20, 2024
1 parent 3c796fd commit 719b39b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,16 @@ extra-dependencies = ["SQLAlchemy>=1.4.19,<2.0.0"]
features = ["development", "pandas"]
python = "3.8"

[tool.hatch.envs.sa14.scripts]
test-dialect = "pytest -ra -vvv --tb=short --cov snowflake.sqlalchemy --cov-append --junitxml ./junit.xml --ignore=tests/sqlalchemy_test_suite tests -m \"not feature_v2\""

[tool.hatch.envs.default.env-vars]
COVERAGE_FILE = "coverage.xml"
SQLACHEMY_WARN_20 = "1"

[tool.hatch.envs.default.scripts]
check = "pre-commit run --all-files"
test-dialect = "pytest -ra -vvv --tb=short --cov snowflake.sqlalchemy --cov-append --junitxml ./junit.xml --ignore=tests/sqlalchemy_test_suite tests/"
test-dialect = "pytest -ra -vvv --tb=short --cov snowflake.sqlalchemy --cov-append --junitxml ./junit.xml --ignore=tests/sqlalchemy_test_suite tests"
test-dialect-compatibility = "pytest -ra -vvv --tb=short --cov snowflake.sqlalchemy --cov-append --junitxml ./junit.xml tests/sqlalchemy_test_suite"
test-dialect-aws = "pytest -m \"aws\" -ra -vvv --tb=short --cov snowflake.sqlalchemy --cov-append --junitxml ./junit.xml --ignore=tests/sqlalchemy_test_suite tests/"
gh-cache-sum = "python -VV | sha256sum | cut -d' ' -f1"
Expand Down Expand Up @@ -131,4 +134,5 @@ markers = [
"requires_external_volume: tests that needs a external volume to be executed",
"external: tests that could but should only run on our external CI",
"feature_max_lob_size: tests that could but should only run on our external CI",
"feature_v2: tests that could but should only run on SqlAlchemy v20",
]
3 changes: 3 additions & 0 deletions tests/test_compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# Copyright (c) 2012-2023 Snowflake Computing Inc. All rights reserved.
#

import pytest
from sqlalchemy import Integer, String, and_, func, select
from sqlalchemy.schema import DropColumnComment, DropTableComment
from sqlalchemy.sql import column, quoted_name, table
Expand Down Expand Up @@ -136,13 +137,15 @@ def test_division_operator_with_denominator_expr():
assert str(stmt.compile(dialect=snowdialect.dialect())) == "col1 / sqrt(col2)"


@pytest.mark.feature_v2
def test_floor_division_operator():
col1 = column("col1")
col2 = column("col2")
stmt = col1 // col2
assert str(stmt.compile(dialect=snowdialect.dialect())) == "FLOOR(col1 / col2)"


@pytest.mark.feature_v2
def test_floor_division_operator_with_denominator_expr():
col1 = column("col1")
col2 = column("col2")
Expand Down

0 comments on commit 719b39b

Please sign in to comment.