@@ -215,14 +215,6 @@ def test_multiple_strings_merged(self):
215215 assert t .strings == ("SELECT 1" ,)
216216 assert t .interpolations == ()
217217
218- def test_bare_param_raises (self ):
219- p = Param (value = 42 , name = "x" )
220- with pytest .raises (TypeError , match = "Unexpected part type" ):
221- SqlTemplate ("SELECT " , p , " FROM t" ) # ty:ignore[invalid-argument-type]
222- wrapped = ParamInterpolation (p )
223- t = SqlTemplate ("SELECT " , wrapped , " FROM t" )
224- assert len (t .interpolations ) == 1
225-
226218 def test_with_interpolation (self ):
227219 interp = FakeInterpolation (value = 42 , expression = "x" )
228220 t = SqlTemplate ("a " , interp , " b" )
@@ -234,6 +226,11 @@ def test_bare_param_errors(self):
234226 with pytest .raises (TypeError , match = "Unexpected part type" ):
235227 SqlTemplate ("SELECT " , p ) # ty:ignore[invalid-argument-type]
236228
229+ def test_wrapped_param (self ):
230+ wrapped = ParamInterpolation (Param (value = 42 , name = "x" ))
231+ t = SqlTemplate ("SELECT " , wrapped , " FROM t" )
232+ assert len (t .interpolations ) == 1
233+
237234 def test_rejects_invalid_types (self ):
238235 """Items that are not str, IntoInterpolation, or Param should raise TypeError."""
239236 with pytest .raises (TypeError , match = "Unexpected part type" ):
0 commit comments