Skip to content

Commit

Permalink
Merge pull request #47 from Semi-ATE/issue_46
Browse files Browse the repository at this point in the history
Fix for issue 41 : Missing SITE_NUM value in the PRR ATDF record
  • Loading branch information
seimit authored Jun 18, 2022
2 parents 748bfe4 + 1652acf commit fbde1fe
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
5 changes: 4 additions & 1 deletion Semi_ATE/STDF/PRR.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,10 @@ def to_atdf(self):
# 3 HEAD_NUM
body += self.gen_atdf(3)
# 4 SITE_NUM
body += self.gen_atdf(4)
site_num = self.gen_atdf(4)
if site_num == "|":
site_num = "1|"
body += site_num
# 12 PART_ID
body += self.gen_atdf(12)
# 6 NUM_TEST
Expand Down
11 changes: 10 additions & 1 deletion tests/test_PRR.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def prr(endian):
expected_atdf += str(head_num) +"|"

site_num = 1
record.set_value('SITE_NUM', site_num)
# record.set_value('SITE_NUM', site_num)
rec_len += 1;
expected_atdf += str(site_num) + "|"

Expand Down Expand Up @@ -62,6 +62,8 @@ def prr(endian):
'''

# part_flg = ['1', '0', '0', '1', '0', '0', '0', '0']
# part_flg = ['1', '0', '0', '0', '0', '0', '0', '0']
part_flg = ['1', '0', '1', '1', '0', '0', '0', '0']
record.set_value('PART_FLG', part_flg)
rec_len += 1;
Expand Down Expand Up @@ -132,6 +134,13 @@ def prr(endian):

w_data = record.__repr__()
io_data = io.BytesIO(w_data)

# print("================")
# print(record)
# print("================")
# print(record.to_atdf())
# print("================")


stdfRecTest = STDFRecordTest(io_data, endian)
# rec_len, rec_type, rec_sub
Expand Down

0 comments on commit fbde1fe

Please sign in to comment.