File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 55from sqlalchemy import String
66from sqlalchemy import Table
77from sqlalchemy .testing import AssertsCompiledSQL
8+ from sqlalchemy .testing import config
89from sqlalchemy .testing import fixtures
910from sqlalchemy .testing import provide_metadata
1011
1112
1213class WithHintTest (fixtures .TestBase , AssertsCompiledSQL ):
13- # __requires__ = ("sync_driver",)
1414
1515 @provide_metadata
1616 def test_with_hint (self ):
@@ -26,7 +26,8 @@ def test_with_hint(self):
2626 select (t ).with_hint (t , "ix_t_txt" ),
2727 "SELECT t.id, t.txt FROM t@ix_t_txt" ,
2828 )
29+ param_placeholder = "%s" if config .db .dialect .is_async else "%(id_1)s"
2930 self .assert_compile (
3031 select (t ).with_hint (t , "ix_t_txt" ).where (t .c .id < 3 ),
31- "SELECT t.id, t.txt FROM t@ix_t_txt WHERE t.id < %(id_1)s " ,
32+ f "SELECT t.id, t.txt FROM t@ix_t_txt WHERE t.id < { param_placeholder } " ,
3233 )
You can’t perform that action at this time.
0 commit comments