Skip to content

Commit

Permalink
tests: increase coverage for BACKSPACE use in Text
Browse files Browse the repository at this point in the history
  • Loading branch information
Cube707 committed Aug 14, 2022
1 parent 2800517 commit 902c85d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/integration/console_render/test_text.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def raise_exc(x, current):
self.assertInStdout("Custom error")

def test_allows_BACKSPACE_deletion(self):
stdin_array = ["a", key.BACKSPACE, "b", key.ENTER]
stdin_array = ["a", key.BACKSPACE, "b", "c", key.LEFT, key.BACKSPACE, key.ENTER]
stdin = helper.event_factory(*stdin_array)
message = "Foo message"
variable = "Bar variable"
Expand All @@ -109,7 +109,7 @@ def test_allows_BACKSPACE_deletion(self):
sut = ConsoleRender(event_generator=stdin)
result = sut.render(question)

self.assertEqual("b", result)
self.assertEqual("c", result)

def test_allows_DELETE_deletion(self):
stdin_array = ["a", "b", key.LEFT, key.LEFT, "c", key.SUPR, key.SUPR, key.ENTER]
Expand Down

0 comments on commit 902c85d

Please sign in to comment.