MCPcopy Index your code
hub / github.com/RustPython/RustPython / eval_file

Method eval_file

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

Source from the content-addressed store, hash-verified

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