File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change 11# pandas/tests/io/sql/test_percent_patterns.py
22import os
3-
43import pytest
4+ from typing import TYPE_CHECKING
55
66sa = pytest .importorskip ("sqlalchemy" )
77
8+ if TYPE_CHECKING :
9+ from sqlalchemy .engine import Engine
10+
811PG = os .environ .get ("PANDAS_TEST_POSTGRES_URI" )
912URL = PG or "sqlite+pysqlite:///:memory:"
1013
1114
12- def _eng ():
15+ def _eng () -> "Engine" :
1316 return sa .create_engine (URL )
1417
1518
16- def test_text_modulo ():
19+ def test_text_modulo () -> None :
1720 import pandas as pd
1821
1922 with _eng ().connect () as c :
2023 df = pd .read_sql (sa .text ("SELECT 5 % 2 AS r" ), c )
2124 assert df .iloc [0 , 0 ] == 1
2225
2326
24- def test_like_single_percent ():
27+ def test_like_single_percent () -> None :
2528 import pandas as pd
2629
2730 with _eng ().connect () as c :
@@ -32,7 +35,7 @@ def test_like_single_percent():
3235 assert len (df ) == 1
3336
3437
35- def test_sqlalchemy_expr_percent_operator ():
38+ def test_sqlalchemy_expr_percent_operator () -> None :
3639 from sqlalchemy import (
3740 literal ,
3841 select ,
You can’t perform that action at this time.
0 commit comments