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):
1452
1452
raise DummyException ("reraised" )
1453
1453
1454
1454
1455
- # TODO: RUSTPYTHON
1456
- @unittest .expectedFailure
1457
1455
def test_blob_closed (self ):
1458
1456
with memory_database () as cx :
1459
1457
cx .execute ("create table test(b blob)" )
Original file line number Diff line number Diff line change @@ -2145,13 +2145,16 @@ mod _sqlite {
2145
2145
}
2146
2146
2147
2147
#[ 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)
2150
2151
}
2151
2152
2152
2153
#[ 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 ( ( ) )
2155
2158
}
2156
2159
2157
2160
fn inner ( & self , vm : & VirtualMachine ) -> PyResult < PyMappedMutexGuard < ' _ , BlobInner > > {
You can’t perform that action at this time.
0 commit comments