def test_extractLineOffsets(self):
        f = libpry.coverage.File(None)
        offsets = [
            #byte    line
            chr(0), chr(1),
            chr(1), chr(1),
            chr(7), chr(255),
            chr(0), chr(10),
            chr(1), chr(1),
        ]
        offets = "".join(offsets)
        expected = [1, 1, 265, 1]
        assert f._extractLineOffsets(offsets) == expected

        offsets = [
            #byte    line
            chr(0), chr(255),
            chr(0), chr(10),
            chr(1), chr(1),
        ]
        offets = "".join(offsets)
        expected = [265, 1]
        assert f._extractLineOffsets(offsets) == expected

        offsets = [
            #byte    line
            chr(1), chr(1),
            chr(0), chr(255),
        ]
        offets = "".join(offsets)
        expected = [1, 255]
        assert f._extractLineOffsets(offsets) == expected
dataset/ETHPy150Open cortesi/pry/test/test_coverage.py/uFile.test_extractLineOffsets/original