From 76e888796724db2d6e24f543a2d990408bb8c213 Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Tue, 1 Aug 2023 11:49:57 +0800 Subject: [PATCH] Correct some spelling errors. --- core/src/toga/widgets/optioncontainer.py | 2 +- core/tests/test_handlers.py | 2 +- core/tests/widgets/test_optioncontainer.py | 2 +- testbed/tests/widgets/test_optioncontainer.py | 3 ++- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/core/src/toga/widgets/optioncontainer.py b/core/src/toga/widgets/optioncontainer.py index 4a770e4ef1..96b107aae5 100644 --- a/core/src/toga/widgets/optioncontainer.py +++ b/core/src/toga/widgets/optioncontainer.py @@ -96,7 +96,7 @@ def remove(self, index: int | str | OptionItem): self.interface.refresh() def __iter__(self): - """Obtain an interator over all tabs in the OptionContainer.""" + """Obtain an iterator over all tabs in the OptionContainer.""" return iter(self._options) def __len__(self) -> int: diff --git a/core/tests/test_handlers.py b/core/tests/test_handlers.py index fc3b147d02..302bb4e095 100644 --- a/core/tests/test_handlers.py +++ b/core/tests/test_handlers.py @@ -102,7 +102,7 @@ def handler(*args, **kwargs): def test_function_handler_with_cleanup_error(capsys): - """A function handler can have a cleanup method that raises an erro""" + """A function handler can have a cleanup method that raises an error.""" obj = Mock() cleanup = Mock(side_effect=Exception("Problem in cleanup")) handler_call = {} diff --git a/core/tests/widgets/test_optioncontainer.py b/core/tests/widgets/test_optioncontainer.py index 349f0d0e2c..505f34d64c 100644 --- a/core/tests/widgets/test_optioncontainer.py +++ b/core/tests/widgets/test_optioncontainer.py @@ -446,7 +446,7 @@ def test_current_tab(optioncontainer, index, on_select_handler): assert optioncontainer.current_tab.index == 0 assert optioncontainer.current_tab.text == "Item 1" - # Programatically select item 2 + # Programmatically select item 2 optioncontainer.current_tab = index # Current tab values have changed diff --git a/testbed/tests/widgets/test_optioncontainer.py b/testbed/tests/widgets/test_optioncontainer.py index 948dcb2b8c..c2567bb282 100644 --- a/testbed/tests/widgets/test_optioncontainer.py +++ b/testbed/tests/widgets/test_optioncontainer.py @@ -79,6 +79,7 @@ async def test_select_tab( ): """Tabs of content can be selected""" # Initially selected tab has content that is the full size of the widget + await probe.redraw("Tab 1 should be selected") assert widget.current_tab.index == 0 assert content1_probe.width > 500 assert content1_probe.height > 400 @@ -86,7 +87,7 @@ async def test_select_tab( # on_select hasn't been invoked. on_select_handler.assert_not_called() - # Select item 1 programatically + # Select item 1 programmatically widget.current_tab = "Tab 2" await probe.redraw("Tab 2 should be selected")