MCPcopy Index your code
hub / github.com/python/cpython / eval_file

Method eval_file

Lib/test/test_decimal.py:296–308  ·  view source on GitHub ↗
(self, file)

Source from the content-addressed store, hash-verified

294 return self.decimal.Decimal(v, context)
295
296 def eval_file(self, file):
297 global skip_expected
298 if skip_expected:
299 raise unittest.SkipTest
300 with open(file, encoding="utf-8") as f:
301 for line in f:
302 line = line.replace('\r\n', '').replace('\n', '')
303 #print line
304 try:
305 t = self.eval_line(line)
306 except self.decimal.DecimalException as exception:
307 #Exception raised where there shouldn't have been one.
308 self.fail('Exception "'+exception.__class__.__name__ + '" raised on line '+line)
309
310
311 def eval_line(self, s):

Callers 1

load_testsFunction · 0.80

Calls 4

eval_lineMethod · 0.95
openFunction · 0.50
replaceMethod · 0.45
failMethod · 0.45

Tested by

no test coverage detected