File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -1744,8 +1744,6 @@ def progress(): pass
1744
1744
with self .assertRaises (sqlite .ProgrammingError ):
1745
1745
con .set_progress_handler (progress , 100 )
1746
1746
1747
- # TODO: RUSTPYTHON
1748
- @unittest .expectedFailure
1749
1747
def test_closed_call (self ):
1750
1748
con = sqlite .connect (":memory:" )
1751
1749
con .close ()
Original file line number Diff line number Diff line change @@ -852,10 +852,14 @@ mod _sqlite {
852
852
}
853
853
854
854
impl Callable for Connection {
855
- type Args = ( PyUtf8StrRef , ) ;
855
+ type Args = FuncArgs ;
856
856
857
857
fn call ( zelf : & Py < Self > , args : Self :: Args , vm : & VirtualMachine ) -> PyResult {
858
- if let Some ( stmt) = Statement :: new ( zelf, args. 0 , vm) ? {
858
+ let _ = zelf. db_lock ( vm) ?;
859
+
860
+ let ( sql, ) : ( PyUtf8StrRef , ) = args. bind ( vm) ?;
861
+
862
+ if let Some ( stmt) = Statement :: new ( zelf, sql, vm) ? {
859
863
Ok ( stmt. into_ref ( & vm. ctx ) . into ( ) )
860
864
} else {
861
865
Ok ( vm. ctx . none ( ) )
You can’t perform that action at this time.
0 commit comments