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 66246e1 commit cbe93e7Copy full SHA for cbe93e7
nipype/pipeline/engine/tests/test_engine.py
@@ -512,11 +512,16 @@ def func2(a):
512
# create dummy distributed plugin class
513
from nipype.pipeline.plugins.base import DistributedPluginBase
514
515
+ # create a custom exception
516
+ class EngineTestException(Exception):
517
+ pass
518
+
519
class RaiseError(DistributedPluginBase):
520
def _submit_job(self, node, updatehash=False):
- raise Exception('Submit called')
521
+ raise EngineTestException('Submit called')
522
- with pytest.raises(Exception) as excinfo:
523
+ # check if a proper exception is raised
524
+ with pytest.raises(EngineTestException) as excinfo:
525
w1.run(plugin=RaiseError())
526
assert 'Submit called' == str(excinfo.value)
527
0 commit comments