Debian Codegraph @

tests/benchmarks/test_manufacturer_data_to_raw.py

raw symbols SCIP
1 from pytest_codspeed import BenchmarkFixture
2
3 from bluetooth_data_tools.utils import manufacturer_data_to_raw
4
5
6 def test_manufacturer_data_to_raw_short(benchmark: BenchmarkFixture) -> None:
7 benchmark(lambda: manufacturer_data_to_raw(0x004C, b"\x01\x02\x03\x04"))
8
9
10 def test_manufacturer_data_to_raw_long(benchmark: BenchmarkFixture) -> None:
11 payload = bytes(range(64))
12 benchmark(lambda: manufacturer_data_to_raw(0xFFFF, payload))