Skip to content
This repository has been archived by the owner on Jan 25, 2024. It is now read-only.

Commit

Permalink
Silence intentional type errors
Browse files Browse the repository at this point in the history
  • Loading branch information
kierdavis committed Mar 30, 2019
1 parent 76b7715 commit 12e1245
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions tests/boards/test_board.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,13 +234,13 @@ def test_board_group_board_by_unknown() -> None:
board_group = BoardGroup(MockBoard, OneBoardMockBackend)

with pytest.raises(TypeError):
board_group[0]
board_group[0] # type: ignore

with pytest.raises(KeyError):
board_group[""]

with pytest.raises(TypeError):
board_group[{}]
board_group[{}] # type: ignore

with pytest.raises(KeyError):
board_group["ARGHHHJ"]
Expand Down
4 changes: 2 additions & 2 deletions tests/components/test_piezo.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,11 @@ def test_piezo_buzz_invalid_value() -> None:
with pytest.raises(ValueError):
piezo.buzz(timedelta(seconds=1), -42)
with pytest.raises(TypeError):
piezo.buzz(timedelta(seconds=1), "j5")
piezo.buzz(timedelta(seconds=1), "j5") # type: ignore
with pytest.raises(ValueError):
piezo.buzz(timedelta(seconds=-2), Note.D7)
with pytest.raises(TypeError):
piezo.buzz(1, Note.D7)
piezo.buzz(1, Note.D7) # type: ignore


def test_note_reversed() -> None:
Expand Down

0 comments on commit 12e1245

Please sign in to comment.