def METHOD_NAME(self):
    file_path = os.path.join(FIXTURES_DIR, "kernel_pre_4.18.txt")
    output_file_success = io.StringIO()
    output_file_error = io.StringIO()
    f_diskstats = None
    try:
        f_diskstats = open(file_path, "r")
        parse_and_print_metrics(f_diskstats, output_file_success, output_file_error)
    finally:
        if f_diskstats:
            f_diskstats.close()
    output_success = output_file_success.getvalue()
    output_error = output_file_error.getvalue()
    output_success_lines = output_success.strip().split("\n")
    self.assertEqual(output_error, "")
    self.assertOutputContainsAllFields(output_success)
    self.assertEqual(
        output_success_lines[0], "iostat.disk.read_requests 100 446216 dev=hda"
    )
    self.assertEqual(
        output_success_lines[-1], "iostat.part.write_sectors 100 38030 dev=hda1"
    )