def test_cross_byte_read(): io = BitStringIO(b"\xAB\x23") assert io.read(12) == 0x3AB assert io.read(4) == 0x02