Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
batmen
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sepia-pub
mael
batmen
Commits
47372428
Commit
47372428
authored
2 years ago
by
jgatt
Browse files
Options
Downloads
Patches
Plain Diff
better docstring monolithic_tests
parent
220b586e
No related branches found
No related tags found
1 merge request
!16
Merge request multibehavior
Pipeline
#5834
passed
2 years ago
Stage: build-and-test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/test_multi_behavior.py
+5
-4
5 additions, 4 deletions
test/test_multi_behavior.py
with
5 additions
and
4 deletions
test/test_multi_behavior.py
+
5
−
4
View file @
47372428
...
...
@@ -34,8 +34,9 @@ def make_monolithic_file(user_name, input_json, probability_name, seed=None, red
with
open
(
schedconf_file
,
'
w+
'
)
as
error_description_file
:
json
.
dump
(
error_file
,
error_description_file
)
def
monolithics_test
(
proba_names
,
names
,
input_json
,
seed
=
None
,
red_windows
=
None
,
yellow_windows
=
None
)
:
"""
Utility function to launch the test with given parameters and compare the output to their dm_user_replay class equivalent
"""
def
monolithic_tests
(
proba_names
,
names
,
input_json
,
seed
=
None
,
red_windows
=
None
,
yellow_windows
=
None
)
:
"""
Utility function to launch tests with users who do only one behavior in windows and compare the output to
their dm_user_replay class equivalent
"""
schedconf_file
=
'
test-instances/user_description_file.json
'
for
proba_name
in
proba_names
:
behavior_name
=
proba_name
.
split
(
"
_
"
)[
-
1
]
...
...
@@ -82,7 +83,7 @@ def test_dm_user_multi_behavior_mono_behavior_red(platform_multiC):
names
=
[
"
user
"
+
str
(
i
+
14
)
for
i
in
range
(
3
)]
+
[
"
user18
"
]
input_json
=
[
"
test/workloads/dyn/user
"
+
str
(
i
+
14
)
+
"
.json
"
for
i
in
range
(
3
)]
+
[
"
test/workloads/dyn/user18.json
"
]
monolithic
s
_test
(
proba_names
,
names
,
input_json
,
seed
=
3
,
red_windows
=
[[
200000
,
300000
]])
monolithic_test
s
(
proba_names
,
names
,
input_json
,
seed
=
3
,
red_windows
=
[[
200000
,
300000
]])
def
test_dm_user_multi_behavior_mono_behavior_yellow
(
platform_multiC
):
...
...
@@ -91,7 +92,7 @@ def test_dm_user_multi_behavior_mono_behavior_yellow(platform_multiC):
names
=
[
"
user
"
+
str
(
i
+
14
)
for
i
in
range
(
3
)]
+
[
"
user18
"
]
input_json
=
[
"
test/workloads/dyn/user
"
+
str
(
i
+
14
)
+
"
.json
"
for
i
in
range
(
3
)]
+
[
"
test/workloads/dyn/user18.json
"
]
monolithic
s
_test
(
proba_names
,
names
,
input_json
,
seed
=
3
,
yellow_windows
=
[[
200000
,
300000
]])
monolithic_test
s
(
proba_names
,
names
,
input_json
,
seed
=
3
,
yellow_windows
=
[[
200000
,
300000
]])
def
test_dm_user_small_workload
(
platform_multiC
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment