summaryrefslogtreecommitdiff
path: root/tests/unit/misc/test_miscwidgets.py
diff options
context:
space:
mode:
authorFlorian Bruhin <git@the-compiler.org>2016-08-04 18:35:35 +0200
committerFlorian Bruhin <git@the-compiler.org>2016-08-04 19:22:44 +0200
commit029ea2e5a7f2b40e23858d3c0d87149351883c9b (patch)
tree2d5d2ca0db134674341d0dfbdd8a2ecf16901768 /tests/unit/misc/test_miscwidgets.py
parent57ed5ae876f2a00922a303224367bae5ccdde7d5 (diff)
downloadqutebrowser-029ea2e5a7f2b40e23858d3c0d87149351883c9b.tar.gz
qutebrowser-029ea2e5a7f2b40e23858d3c0d87149351883c9b.zip
Add miscwidgets.WrapperLayout.wrap
This makes it easier for an user of WrapperLayout to wrap a widget.
Diffstat (limited to 'tests/unit/misc/test_miscwidgets.py')
-rw-r--r--tests/unit/misc/test_miscwidgets.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/unit/misc/test_miscwidgets.py b/tests/unit/misc/test_miscwidgets.py
index 8e92176f9..728731971 100644
--- a/tests/unit/misc/test_miscwidgets.py
+++ b/tests/unit/misc/test_miscwidgets.py
@@ -89,8 +89,14 @@ class TestWrapperLayout:
parent = QWidget()
qtbot.add_widget(wrapped)
qtbot.add_widget(parent)
- miscwidgets.WrapperLayout(wrapped, parent)
+ layout = miscwidgets.WrapperLayout(parent)
+ layout.wrap(parent, wrapped)
+ parent.wrapped = wrapped
return parent
def test_size_hint(self, container):
assert container.sizeHint() == QSize(23, 42)
+
+ def test_wrapped(self, container):
+ assert container.wrapped.parent() is container
+ assert container.focusProxy() is container.wrapped