| 1 | from bluetooth_data_tools.utils import newest_manufacturer_data |
| 2 | |
| 3 | |
| 4 | def test_newest_manufacturer_data_single(benchmark): |
| 5 | data = {0x004C: b"\x10\x05\x03\x18\x42\xc4\xff\xaa"} |
| 6 | benchmark(lambda: newest_manufacturer_data(data)) |
| 7 | |
| 8 | |
| 9 | def test_newest_manufacturer_data_multi(benchmark): |
| 10 | data = { |
| 11 | 0x004C: b"\x10\x05\x03\x18\x42\xc4\xff\xaa", |
| 12 | 0x00FF: b"\x01\x02\x03\x04", |
| 13 | } |
| 14 | benchmark(lambda: newest_manufacturer_data(data)) |