コード例 #1
0
 def test_save(self, mouse):
     mouse.save()
     mouse._hid_device.bytes.seek(0)
     hid_report = mouse._hid_device.bytes.read()
     assert hid_report == b"\x02\x00\x59\x00"
コード例 #2
0
ファイル: test_mouse.py プロジェクト: nixtux/rivalcfg
 def test_save(self, mouse):
     mouse.save()
     mouse._hid_device.bytes.seek(0)
     assert mouse._hid_device.bytes.read() == b"\x02\x00\x5A\x0E"
コード例 #3
0
 def test_save(self, mouse):
     mouse.save()
     mouse._hid_device.bytes.seek(0)
     hid_report = mouse._hid_device.bytes.read()
     assert len(hid_report) == 1 + 1 + 32   # report_type + report_id + data
     assert hid_report.startswith(b"\x02\x00\x09\x00")