The convert_to_str() function used to convert a list of JobRecord objects to a string does not actually convert it to a string, but rather just appends separate strings to a list and then returns a list. Thus, flux-account.py has to have some special logic for just the view-job-records command to parse the returned data from the function.
This PR adds a .join() call to the convert_to_str() function to actually construct a string of all of the job records returned by view_jobs(). It also removes the special logic in flux-account.py that iterates through the list of job records and prints it out since it is no longer needed. I've also adjusted the unit tests in t1006_job_archive.py to use a better function in jobs_table_subcommands.py, as well as fixed a test description for one of the unit tests.
Problem
The
convert_to_str()
function used to convert a list ofJobRecord
objects to a string does not actually convert it to a string, but rather just appends separate strings to a list and then returns a list. Thus,flux-account.py
has to have some special logic for just theview-job-records
command to parse the returned data from the function.This PR adds a
.join()
call to theconvert_to_str()
function to actually construct a string of all of the job records returned byview_jobs()
. It also removes the special logic influx-account.py
that iterates through the list of job records and prints it out since it is no longer needed. I've also adjusted the unit tests int1006_job_archive.py
to use a better function injobs_table_subcommands.py
, as well as fixed a test description for one of the unit tests.