Skip to content

Commit

Permalink
Fix tests for the feature of label-specific flags
Browse files Browse the repository at this point in the history
  • Loading branch information
wkentaro committed May 15, 2019
1 parent 7ad8d5c commit 05ed24c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion tests/test_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def check_imageData():
(986, 742),
(1184, 102),
]
shape = label, points, None, None, 'polygon'
shape = label, points, None, None, 'polygon', {}
shapes = [shape]
win.loadLabels(shapes)
win.saveFile()
Expand Down
15 changes: 9 additions & 6 deletions tests/widgets_tests/test_label_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,9 @@ def interact():
qtbot.keyClick(widget.edit, QtCore.Qt.Key_Enter) # NOQA

QtCore.QTimer.singleShot(500, interact)
text = widget.popUp('cat')
assert text == 'person'
label, flags = widget.popUp('cat')
assert label == 'person'
assert flags == {}

# popUp()

Expand All @@ -69,8 +70,9 @@ def interact():
qtbot.keyClick(widget.edit, QtCore.Qt.Key_Enter) # NOQA

QtCore.QTimer.singleShot(500, interact)
text = widget.popUp()
assert text == 'person'
label, flags = widget.popUp()
assert label == 'person'
assert flags == {}

# popUp() + key_Up

Expand All @@ -80,5 +82,6 @@ def interact():
qtbot.keyClick(widget.edit, QtCore.Qt.Key_Enter) # NOQA

QtCore.QTimer.singleShot(500, interact)
text = widget.popUp()
assert text == 'dog'
label, flags = widget.popUp()
assert label == 'dog'
assert flags == {}

0 comments on commit 05ed24c

Please sign in to comment.