File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change 11from __future__ import annotations
22
3- import pytest
43from typing import Any
54
5+ import pytest
6+
67pytest .importorskip ("sqlalchemy" )
78
89
910def test_modulo_operator (sql_con : Any ) -> None :
10- # Example test for modulo operator escaping
1111 query = "SELECT 10 % 3"
1212 result = sql_con .execute (query )
1313 assert result .scalar () == 1
1414
1515
1616def test_like_pattern (sql_con : Any ) -> None :
17- # Example test for LIKE pattern with percent signs
1817 query = "SELECT 'abc' LIKE 'a%'"
1918 result = sql_con .execute (query )
2019 assert result .scalar () == 1
2120
2221
2322def test_sqlalchemy_selectable (sql_con : Any ) -> None :
24- # Example test using a SQLAlchemy selectable
25- from sqlalchemy import select , literal
23+ from sqlalchemy import literal , select
2624
2725 stmt = select (literal ("hello" ))
2826 result = sql_con .execute (stmt )
You can’t perform that action at this time.
0 commit comments