Fixed test for segment start address

This commit is contained in:
Rob McMullen 2017-05-06 22:41:03 -07:00
parent b63e0508ac
commit b3800e81ac

View File

@ -4,6 +4,7 @@ import numpy as np
import pytest
from atrcopy import DefaultSegment, SegmentData, get_xex, interleave_segments, user_bit_mask, diff_bit_mask
from atrcopy.errors import *
def get_indexed(segment, num, scale):
@ -32,7 +33,9 @@ class TestSegment1(object):
s[1].set_comment_at(10, "comment 10")
s[1].set_comment_at(100, "comment 100")
print list(s[1].iter_comments_in_segment())
seg, subseg = get_xex(s, 0xbeef)
with pytest.raises(InvalidBinaryFile):
seg, subseg = get_xex(s, 0xbeef)
seg, subseg = get_xex(s)
assert tuple(seg.data[0:2]) == (0xff, 0xff)
# 2 bytes for the ffff
# 4 bytes per segment for start, end address