Skip to content

Commit

Permalink
Add a bytes test to explicitly test for NULL char
Browse files Browse the repository at this point in the history
  • Loading branch information
BrianPugh committed Sep 26, 2023
1 parent 032f6c0 commit 8c6f2fd
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/integration/test_function_decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,16 @@ def test_task_basic(emulated_device, mocker):
def foo(val):
return 2 * val

@emulated_device.task
def bytes_task():
return b"\x00\x01\x02"

assert foo(5) == 10

spy_parse_belay_response.assert_called_once_with("_BELAYR10\r\n")

assert bytes_task() == b"\x00\x01\x02"


def test_task_basic_trusted(emulated_device, mocker):
@emulated_device.task(trusted=True)
Expand Down

0 comments on commit 8c6f2fd

Please sign in to comment.