MCPcopy Create free account
hub / github.com/ARM-software/astc-encoder / load_from_file

Method load_from_file

Test/testlib/resultset.py:244–270  ·  view source on GitHub ↗

Load a reference result set from a CSV file on disk. Args: file_path: The input file path.

(self, file_path: Path)

Source from the content-addressed store, hash-verified

242 writer.writerow(row)
243
244 def load_from_file(self, file_path: Path) -> None:
245 '''
246 Load a reference result set from a CSV file on disk.
247
248 Args:
249 file_path: The input file path.
250 '''
251 with open(file_path, 'r', encoding='utf-8') as handle:
252 reader = csv.reader(handle)
253
254 # Skip the header
255 next(reader)
256
257 # Read the data rows
258 for row in reader:
259 assert row[0] == self.test_set_name
260
261 record = Record(
262 row[1],
263 row[2],
264 float(row[3]),
265 float(row[4]),
266 float(row[5]),
267 float(row[6])
268 )
269
270 self.add_record(record)
271
272
273class ResultSummary:

Callers 1

mainFunction · 0.95

Calls 2

add_recordMethod · 0.95
RecordClass · 0.85

Tested by 1

mainFunction · 0.76