used wrong type
This commit is contained in:
Martin Diehl 2020-05-26 07:15:27 +02:00
parent 670e08468b
commit 5ad7fe04d0
1 changed files with 4 additions and 3 deletions

View File

@ -271,9 +271,10 @@ class TestResult:
default.pick('times',default.times_in_range(0,np.inf)[-1])
default.add_Cauchy()
loc = default.get_dataset_location('sigma')[0]
loc = default.get_dataset_location('sigma')
print(loc)
with h5py.File(default.fname,'r') as f:
created_first = f[loc].attrs['Created'].decode()
created_first = f[loc[0]].attrs['Created'].decode()
created_first = datetime.strptime(created_first,'%Y-%m-%d %H:%M:%S%z')
if overwrite == 'on':
@ -284,7 +285,7 @@ class TestResult:
time.sleep(2.)
default.add_calculation('sigma','#sigma#*0.0+311.','not the Cauchy stress')
with h5py.File(default.fname,'r') as f:
created_second = f[loc].attrs['Created'].decode()
created_second = f[loc[0]].attrs['Created'].decode()
created_second = datetime.strptime(created_second,'%Y-%m-%d %H:%M:%S%z')
if overwrite == 'on':
assert created_first < created_second and np.allclose(default.read_dataset(loc),311.)