File tree Expand file tree Collapse file tree 1 file changed +12
-11
lines changed
nipype/pipeline/plugins/tests Expand file tree Collapse file tree 1 file changed +12
-11
lines changed Original file line number Diff line number Diff line change @@ -20,21 +20,22 @@ def test_scipy_sparse():
20
20
21
21
def test_report_crash ():
22
22
with mock .patch ('pickle.dump' , mock .MagicMock ()) as mock_pickle_dump :
23
- mock_pickle_dump .return_value = True
24
- mock_node = mock .MagicMock (name = 'mock_node' )
25
- mock_node ._id = 'an_id'
26
- mock_node .config = {
27
- 'execution' : {
28
- 'crashdump_dir' : '.'
23
+ with mock .patch ('nipype.pipeline.plugins.base.format_exception' , mock .MagicMock ()): # see iss 1517
24
+ mock_pickle_dump .return_value = True
25
+ mock_node = mock .MagicMock (name = 'mock_node' )
26
+ mock_node ._id = 'an_id'
27
+ mock_node .config = {
28
+ 'execution' : {
29
+ 'crashdump_dir' : '.'
30
+ }
29
31
}
30
- }
31
32
32
- actual_crashfile = pb .report_crash (mock_node )
33
+ actual_crashfile = pb .report_crash (mock_node )
33
34
34
- expected_crashfile = re .compile ('.*/crash-.*-an_id-[0-9a-f\-]*.pklz' )
35
+ expected_crashfile = re .compile ('.*/crash-.*-an_id-[0-9a-f\-]*.pklz' )
35
36
36
- yield assert_regexp_matches , actual_crashfile , expected_crashfile
37
- yield assert_true , mock_pickle_dump .call_count == 1
37
+ yield assert_regexp_matches , actual_crashfile , expected_crashfile
38
+ yield assert_true , mock_pickle_dump .call_count == 1
38
39
39
40
'''
40
41
Can use the following code to test that a mapnode crash continues successfully
You can’t perform that action at this time.
0 commit comments