Commit 0cf8786
committed
fix: fix code to make tests of session and otks databases pass on windows
The existing code had a few issues:
sessions_dbm.py:
detect dumbdbm when used on windows python and properly delete session/otks
databases so clear() works.
make sure the Session/Otks.cache_db_type() is called even when the database
is newly created.
test/session_common.py:
close session and otks database in teardown before deleting database
directory to prevent errors from deleting open files on windows.
test/test_sqlite.py:
close the session and otks databases opened by SessionTest.setUp(self)
so the salite session/otks database are closed before the new anydbm
sessions databases are opened for testing the sqlite main db and anydbm
as session/otks db. Again this causes deletion of database test directory
to fail on windows as you can't delete open files.1 parent 09ceb7d commit 0cf8786
File tree
3 files changed
+14
-2
lines changed- roundup/backends
- test
3 files changed
+14
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
45 | 48 | | |
46 | 49 | | |
47 | 50 | | |
| |||
142 | 145 | | |
143 | 146 | | |
144 | 147 | | |
145 | | - | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
146 | 151 | | |
147 | 152 | | |
148 | 153 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
52 | 56 | | |
53 | 57 | | |
54 | 58 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
229 | 229 | | |
230 | 230 | | |
231 | 231 | | |
232 | | - | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
233 | 236 | | |
234 | 237 | | |
235 | 238 | | |
| |||
0 commit comments