Commit 0f9e36f3 authored by Jaden's avatar Jaden
Browse files

converted exp run tests to test both executors

parent ce7c8d4d
......@@ -468,7 +468,7 @@ class Executor(object):
raise RuntimeError("execution information is bogus:\n * %s" % \
'\n * '.join(self.errors))
import ipdb; ipdb.set_trace()
#import ipdb; ipdb.set_trace()
self.runner = self.algorithm.runner()
retval = self.runner.setup(self.data['parameters'])
......
......@@ -183,20 +183,42 @@ def test_run_double_triangle_1():
@slow
@nose.tools.with_setup(teardown=cleanup)
def test_run_single_error_1():
@nose.tools.raises(NameError)
def test_run_single_error_1_local():
# When running locally, the module with the error is loaded
# inside the currently running process and will raise a NameError.
obj = 'user/user/single/1/single_error'
nose.tools.eq_(call('run', obj, cache=tmp_prefix), 1)
nose.tools.eq_(call('run', obj, '--local', cache=tmp_prefix), 1)
@slow
@nose.tools.with_setup(teardown=cleanup)
def test_run_single_error_twice():
def test_run_single_error_1_docker():
# When running on docker, the module is loaded in the docker
# container and the local process will return '1'.
obj = 'user/user/single/1/single_error'
nose.tools.eq_(call('run', obj, '--docker', cache=tmp_prefix), 1)
@slow
@nose.tools.with_setup(teardown=cleanup)
@nose.tools.raises(NameError)
def test_run_single_error_twice_local():
# This one makes sure our output reset is working properly. Both tries should
# give out the same error.
obj = 'user/user/single/1/single_error'
nose.tools.eq_(call('run', obj, '--local', cache=tmp_prefix), 1)
nose.tools.eq_(call('run', obj, '--local', cache=tmp_prefix), 1)
@slow
@nose.tools.with_setup(teardown=cleanup)
def test_run_single_error_twice_docker():
# This one makes sure our output reset is working properly. Both tries should
# give out the same error.
obj = 'user/user/single/1/single_error'
nose.tools.eq_(call('run', obj, cache=tmp_prefix), 1)
nose.tools.eq_(call('run', obj, cache=tmp_prefix), 1)
nose.tools.eq_(call('run', obj, '--docker', cache=tmp_prefix), 1)
nose.tools.eq_(call('run', obj, '--docker', cache=tmp_prefix), 1)
@nose.tools.with_setup(teardown=cleanup)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment