Skip to content

Commit

Permalink
Correct some spelling errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
freakboy3742 committed Aug 1, 2023
1 parent 7747857 commit 76e8887
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion core/src/toga/widgets/optioncontainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion core/tests/test_handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {}
Expand Down
2 changes: 1 addition & 1 deletion core/tests/widgets/test_optioncontainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion testbed/tests/widgets/test_optioncontainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,15 @@ 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

# 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")

Expand Down

0 comments on commit 76e8887

Please sign in to comment.