File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -1452,8 +1452,6 @@ class DummyException(Exception):
14521452 raise DummyException ("reraised" )
14531453
14541454
1455- # TODO: RUSTPYTHON
1456- @unittest .expectedFailure
14571455 def test_blob_closed (self ):
14581456 with memory_database () as cx :
14591457 cx .execute ("create table test(b blob)" )
Original file line number Diff line number Diff line change @@ -2145,13 +2145,16 @@ mod _sqlite {
21452145 }
21462146
21472147 #[ pymethod]
2148- fn __enter__ ( zelf : PyRef < Self > ) -> PyRef < Self > {
2149- zelf
2148+ fn __enter__ ( zelf : PyRef < Self > , vm : & VirtualMachine ) -> PyResult < PyRef < Self > > {
2149+ let _ = zelf. inner ( vm) ?;
2150+ Ok ( zelf)
21502151 }
21512152
21522153 #[ pymethod]
2153- fn __exit__ ( & self , _args : FuncArgs ) {
2154- self . close ( )
2154+ fn __exit__ ( & self , _args : FuncArgs , vm : & VirtualMachine ) -> PyResult < ( ) > {
2155+ let _ = self . inner ( vm) ?;
2156+ self . close ( ) ;
2157+ Ok ( ( ) )
21552158 }
21562159
21572160 fn inner ( & self , vm : & VirtualMachine ) -> PyResult < PyMappedMutexGuard < ' _ , BlobInner > > {
You can’t perform that action at this time.
0 commit comments