Skip to content

Commit 6adb033

Browse files
committed
TEST: Use a cursor as a lock to avoid races
1 parent f560f16 commit 6adb033

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

nibabel/tests/test_dft.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,9 @@ def setUpModule():
3030

3131

3232
def test_init():
33-
dft.clear_cache()
34-
dft.update_cache(data_dir)
33+
with dft.DB.readwrite_cursor() as c: # Use a cursor as a lock
34+
dft.clear_cache()
35+
dft.update_cache(data_dir)
3536

3637

3738
def test_study():

0 commit comments

Comments
 (0)