We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f6d9992 commit 9758d55Copy full SHA for 9758d55
nibabel/tests/test_arrayproxy.py
@@ -467,12 +467,14 @@ def test_keep_file_open_true_false_invalid():
467
fname = 'testdata'
468
with open(fname, 'wb') as fobj:
469
fobj.write(data.tostring(order='F'))
470
- with assert_raises(ValueError):
471
- ArrayProxy(fname, ((10, 10, 10), dtype), keep_file_open=55)
472
473
- ArrayProxy(fname, ((10, 10, 10), dtype), keep_file_open='auto')
474
475
- ArrayProxy(fname, ((10, 10, 10), dtype), keep_file_open='cauto')
+
+ for invalid_kfo in (55, 'auto', 'cauto'):
+ with assert_raises(ValueError):
+ ArrayProxy(fname, ((10, 10, 10), dtype),
+ keep_file_open=invalid_kfo)
+ with patch_keep_file_open_default(invalid_kfo):
476
477
+ ArrayProxy(fname, ((10, 10, 10), dtype))
478
479
480
def test_pickle_lock():
0 commit comments