Closed ownport closed 10 years ago
@ownport And what is the problem if you do exactly the same with the current version?
Traceback (most recent call last):
File "/media/data1/dev/virtenvs/github-sqlitedict/src/tests/test_named_db.py", line 22, in tearDown
self.d.terminate()
File "/media/data1/dev/virtenvs/github-sqlitedict/src/sqlitedict.py", line 223, in terminate
os.remove(self.filename)
OSError: [Errno 2] No such file or directory: ':memory:'
Of course we can add handling of this exception but in log we will see
sqlitedict: INFO: deleting :memory:
So it's more syntax sugar that real support of sqlitedict in memory
Aha, good catch. The try catch
in terminate()
only catches IOError
, but this is OSError
.
I agree we don't need the log line in this case. And thanks for the unittest too :)
Merging.
To use just define filename as ':memory:'.