Commits
Des Small authored 35592a50857 Merge
428 428 | res = False |
429 429 | pstr = "[ {} ] {} : Mask is {} at {} ( {} : should be {} )\n".format(testname, imname, str(readval), str(thepos), TestHelpers().verdict(res), str(theval)) |
430 430 | logging.info(pstr) |
431 431 | return pstr |
432 432 | |
433 433 | def check_ref_freq(self, imname, theval=0, epsilon=0.05, testname="check_ref_freq"): |
434 434 | pstr = '' |
435 435 | retres = True |
436 436 | _ia.open(imname) |
437 437 | csys = _ia.coordsys() |
438 - | _ia.close() |
438 + | _ia.done() |
439 439 | reffreq = csys.referencevalue()['numeric'][3] |
440 + | csys.close() |
440 441 | if abs(reffreq - theval)/theval > epsilon: |
441 442 | retres = False |
442 443 | else: |
443 444 | retres = True |
444 445 | pstr = "[ {} ] Ref-Freq is {} ( {} : should be {} )\n".format(testname, str(reffreq), TestHelpers().verdict(retres), str(theval)) |
445 446 | logging.info(pstr) |
446 447 | return pstr |
447 448 | |
448 449 | def check_imexist(self, imgexist): |
449 450 | pstr = '' |