Commit edcc9f5c authored by Samuel GAIST's avatar Samuel GAIST Committed by Samuel Gaist
Browse files

[test][experiment] Test to ensure proper output of experiment run

parent c2177195
Pipeline #20163 passed with stages
in 43 minutes and 7 seconds
......@@ -30,10 +30,11 @@
import os
import sys
import logging
import nose.tools
from . import platform, disconnected, prefix, tmp_prefix, user, token, temp_cwd
from .utils import index_experiment_dbs
from .utils import index_experiment_dbs, MockLoggingHandler
from ..common import Selector
from ..scripts.beat import main
from beat.core.test.utils import slow, cleanup, skipif
......@@ -181,6 +182,24 @@ def test_delete_integers_addition_1_cache():
nose.tools.eq_(call('caches', '--delete', obj, cache=tmp_prefix), 0)
@slow
@nose.tools.with_setup(setup=setup_experiments, teardown=cleanup)
def test_run_integers_addition_1_twice():
log_handler = MockLoggingHandler(level='DEBUG')
logging.getLogger().addHandler(log_handler)
log_messages = log_handler.messages
obj = 'user/user/integers_addition/1/integers_addition'
nose.tools.eq_(call('run', obj, cache=tmp_prefix), 0)
info_len = len(log_messages['info'])
nose.tools.eq_(info_len, 5)
assert log_messages['info'][info_len - 1].startswith(' Results')
nose.tools.eq_(call('run', obj, cache=tmp_prefix), 0)
info_len = len(log_messages['info'])
nose.tools.eq_(info_len, 8)
assert log_messages['info'][info_len - 1].startswith(' Results')
@slow
@nose.tools.with_setup(setup=setup_experiments, teardown=cleanup)
def test_run_double_triangle_1():
......
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