Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
beat
beat.cmdline
Commits
edcc9f5c
Commit
edcc9f5c
authored
May 15, 2018
by
Samuel GAIST
Committed by
Samuel Gaist
May 15, 2018
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
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
beat/cmdline/test/test_experiments.py
View file @
edcc9f5c
...
...
@@ -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
():
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment