def far(end):
    record = FAR(endian=end)
    tf = tempfile.NamedTemporaryFile(delete=False)
    f = open(tf.name, 'wb')
    w_data = record.__repr__()
    f.write(w_data)
    f.close
    f = open(tf.name, 'rb')
    stdfRecTest = STDFRecordTest(f, end)
    stdfRecTest.assert_file_record_header(2, 0, 10)
    stdfRecTest.assert_ubyte(2)
    stdfRecTest.assert_ubyte(4)
    f.close()
    inst = FAR('V4', end, w_data)
    stdfRecTest.assert_instance_record_header(inst, 2, 0, 10)
    stdfRecTest.assert_instance_field(inst, 3, 2)
    stdfRecTest.assert_instance_field(inst, 4, 4)
    expected_atdf = 'FAR:A|4|2|U'
    assert (inst.to_atdf() == expected_atdf)
    os.remove(tf.name)
def far(end):
    record = FAR(endian=end)
    tf = tempfile.NamedTemporaryFile(delete=False)
    f = open(tf.name, 'wb')
    w_data = record.__repr__()
    f.write(w_data)
    f.close
    f = open(tf.name, 'rb')
    stdfRecTest = STDFRecordTest(f, end)
    stdfRecTest.assert_file_record_header(2, 0, 10)
    stdfRecTest.assert_ubyte(2)
    stdfRecTest.assert_ubyte(4)
    f.close()
    inst = FAR('V4', end, w_data)
    stdfRecTest.assert_instance_record_header(inst, 2, 0, 10)
    stdfRecTest.assert_instance_field(inst, 3, 2)
    stdfRecTest.assert_instance_field(inst, 4, 4)
    expected_atdf = 'FAR:A|4|2|U'
    assert (inst.to_atdf() == expected_atdf)
    os.remove(tf.name)