Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
beat.editor
Manage
Activity
Members
Labels
Plan
Issues
11
Issue boards
Milestones
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
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
beat
beat.editor
Merge requests
!104
Remove test specific method from PlotterEditor
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Remove test specific method from PlotterEditor
plottereditor_remove_test_specific_method
into
v2
Overview
0
Commits
1
Pipelines
1
Changes
2
Merged
Samuel GAIST
requested to merge
plottereditor_remove_test_specific_method
into
v2
5 years ago
Overview
0
Commits
1
Pipelines
1
Changes
2
Expand
Summary
This merge request removes a test specific method that was not needed at all.
👍
0
👎
0
Merge request reports
Compare
v2
v2 (base)
and
latest version
latest version
501e227e
1 commit,
5 years ago
2 files
+
14
−
19
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
Search (e.g. *.vue) (Ctrl+P)
beat/editor/test/test_plottereditor.py
+
14
−
16
Options
@@ -79,31 +79,29 @@ class TestParameterViewer:
class
TestPlotterEditor
:
"""
Test that the plotter editor works correctly
"""
def
test_load_and_dump
(
self
,
qtbot
,
dataformat_model
,
test_prefix
):
def
test_load_and_dump
(
self
,
qtbot
,
dataformat_model
,
test_prefix
,
beat_context
):
asset_name
=
"
user/scatter/1
"
asset
=
Asset
(
test_prefix
,
AssetType
.
PLOTTER
,
asset_name
)
with
open
(
asset
.
declaration_path
,
"
rt
"
)
as
json_file
:
json_data
=
json
.
load
(
json_file
)
editor
=
PlotterEditor
()
editor
.
set_dataformat_model_to_combobox
(
dataformat_model
)
editor
.
load_json
(
json_data
)
json_data
=
asset
.
declaration
editor
=
PlotterEditor
()
editor
.
set_context
(
beat_context
)
editor
.
load_json
(
json_data
)
qtbot
.
addWidget
(
editor
)
qtbot
.
addWidget
(
editor
)
assert
editor
.
dump_json
()
==
json_data
assert
editor
.
dump_json
()
==
json_data
def
test_change_dataformat
(
self
,
qtbot
,
dataformat_model
,
test_prefix
):
def
test_change_dataformat
(
self
,
qtbot
,
dataformat_model
,
test_prefix
,
beat_context
):
asset_name
=
"
user/scatter/1
"
asset
=
Asset
(
test_prefix
,
AssetType
.
PLOTTER
,
asset_name
)
with
open
(
asset
.
declaration_path
,
"
rt
"
)
as
json_file
:
json_data
=
json
.
load
(
json_file
)
editor
=
PlotterEditor
()
editor
.
set_dataformat_model_to_combobox
(
dataformat_model
)
editor
.
load_json
(
json_data
)
json_data
=
asset
.
declaration
editor
=
PlotterEditor
()
editor
.
set_context
(
beat_context
)
editor
.
load_json
(
json_data
)
qtbot
.
addWidget
(
editor
)
qtbot
.
addWidget
(
editor
)
assert
editor
.
dump_json
()
==
json_data
assert
editor
.
dump_json
()
==
json_data
asset_list
=
dataformat_model
.
stringList
()
qtbot
.
keyClicks
(
editor
.
dataformat_combobox
,
asset_list
[
1
])
Loading