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.editor
Commits
6987cd9e
Commit
6987cd9e
authored
Mar 28, 2019
by
Samuel GAIST
Browse files
[widgets][libraryeditor] Add missing documentation
Test cleanup
parent
2593d1d8
Changes
2
Hide whitespace changes
Inline
Side-by-side
beat/editor/test/test_libraryeditor.py
View file @
6987cd9e
...
...
@@ -33,6 +33,7 @@ class TestLibraryEditor:
def
test_load_and_dump
(
self
,
qtbot
,
test_prefix
):
reference_json
=
{
"description"
:
"test"
,
"uses"
:
{}}
editor
=
LibraryEditor
()
qtbot
.
addWidget
(
editor
)
editor
.
set_prefix_root
(
test_prefix
)
editor
.
load_json
(
reference_json
)
...
...
@@ -42,6 +43,7 @@ class TestLibraryEditor:
faulty_json
=
{
"description"
:
"test"
,
"uses"
:
{
"alias"
:
"test/dummy/1"
}}
reference_json
=
{
"description"
:
"test"
,
"uses"
:
{}}
editor
=
LibraryEditor
()
qtbot
.
addWidget
(
editor
)
editor
.
set_prefix_root
(
test_prefix
)
editor
.
load_json
(
faulty_json
)
...
...
beat/editor/widgets/libraryeditor.py
View file @
6987cd9e
...
...
@@ -34,7 +34,14 @@ from .libraries import LibrariesWidget
@
frozen
class
LibraryEditor
(
AbstractAssetEditor
):
"""Editor for the Library asset"""
def
__init__
(
self
,
parent
=
None
):
"""Constructor
:param parent QWidget: parent of this widget
"""
super
(
LibraryEditor
,
self
).
__init__
(
parent
)
self
.
setObjectName
(
self
.
__class__
.
__name__
)
self
.
set_title
(
self
.
tr
(
"Library"
))
...
...
Write
Preview
Supports
Markdown
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