def test_issue_83_xls_file_handle():
    proc = psutil.Process()
    test_file = os.path.join("tests", "fixtures", "date_field.xls")
    open_files_l1 = proc.open_files()

    # start with a csv file
    data = p.iget_array(file_name=test_file)
    open_files_l2 = proc.open_files()
    delta = len(open_files_l2) - len(open_files_l1)
    # interestingly, no open file using xlrd
    assert delta == 0

    # now the file handle get opened when we run through
    # the generator
    list(data)
    open_files_l3 = proc.open_files()
    delta = len(open_files_l3) - len(open_files_l1)
    # still no open file
    assert delta == 0

    p.free_resources()
    open_files_l4 = proc.open_files()
    eq_(open_files_l1, open_files_l4)