Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
beat
beat.editor
Commits
8846a2dd
Commit
8846a2dd
authored
Nov 27, 2019
by
Flavio TARSETTI
Browse files
[test][toolchaineditor] load/dump toolchain
parent
40679532
Changes
2
Hide whitespace changes
Inline
Side-by-side
beat/editor/test/test_toolchaineditor.py
View file @
8846a2dd
...
...
@@ -29,7 +29,7 @@ from ..backend.asset import Asset
from
..backend.asset
import
AssetType
from
..backend.assetmodel
import
AssetModel
#
from ..widgets.toolchaineditor import ToolchainEditor
from
..widgets.toolchaineditor
import
ToolchainEditor
from
.conftest
import
sync_prefix
from
.conftest
import
prefix
...
...
@@ -58,14 +58,10 @@ class TestToolchainEditor:
@
pytest
.
mark
.
parametrize
(
"toolchain"
,
get_valid_toolchains
(
prefix
))
def
test_load_and_dump
(
self
,
qtbot
,
test_prefix
,
toolchain
):
pass
reference_json
=
get_toolchain_declaration
(
test_prefix
,
toolchain
)
editor
=
ToolchainEditor
()
# reference_json = get_toolchain_declaration(test_prefix, toolchain)
# editor = ToolchainEditor()
editor
.
load_json
(
reference_json
)
#
# editor.load_json(reference_json)
#
# assert editor.dump_json() == reference_json
assert
editor
.
dump_json
()
==
reference_json
beat/editor/widgets/toolchaineditor.py
View file @
8846a2dd
...
...
@@ -1793,7 +1793,12 @@ class Toolchain(QWidget):
"width"
:
int
(
block
.
custom_width
),
"height"
:
int
(
block
.
custom_height
),
}
data
[
block_type
.
value
]
=
block_type_list
if
block_type
==
BlockType
.
LOOPS
:
if
has_loops
:
data
[
block_type
.
value
]
=
block_type_list
else
:
data
[
block_type
.
value
]
=
block_type_list
connection_list
=
[]
for
connection
in
self
.
connections
:
...
...
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