adjusted to new ASCII table file handling

This commit is contained in:
Martin Diehl 2015-08-12 12:51:47 +00:00
parent 77d0cf8612
commit 36caddcc24
1 changed files with 4 additions and 5 deletions

View File

@ -248,8 +248,7 @@ class Test():
import numpy import numpy
logging.info('comparing\n '+File1+'\n '+File2) logging.info('comparing\n '+File1+'\n '+File2)
with open(File1) as refFile: table = damask.ASCIItable(File1,readonly=True)
table = damask.ASCIItable(refFile)
table.head_read() table.head_read()
refArray = numpy.nan_to_num(numpy.genfromtxt(File1,missing_values='n/a',skip_header = len(table.info)+2,autostrip=True)) refArray = numpy.nan_to_num(numpy.genfromtxt(File1,missing_values='n/a',skip_header = len(table.info)+2,autostrip=True))
@ -316,9 +315,9 @@ class Test():
else: else:
raise Exception('trying to compare %i with %i normed by %i data sets'%(len(headings0),len(headings1),len(normHeadings))) raise Exception('trying to compare %i with %i normed by %i data sets'%(len(headings0),len(headings1),len(normHeadings)))
table0 = damask.ASCIItable(open(file0)) table0 = damask.ASCIItable(file0)
table0.head_read() table0.head_read()
table1 = damask.ASCIItable(open(file1)) table1 = damask.ASCIItable(file1)
table1.head_read() table1.head_read()
for i in xrange(dataLength): for i in xrange(dataLength):