parent
670e08468b
commit
5ad7fe04d0
|
@ -271,9 +271,10 @@ class TestResult:
|
||||||
default.pick('times',default.times_in_range(0,np.inf)[-1])
|
default.pick('times',default.times_in_range(0,np.inf)[-1])
|
||||||
|
|
||||||
default.add_Cauchy()
|
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:
|
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')
|
created_first = datetime.strptime(created_first,'%Y-%m-%d %H:%M:%S%z')
|
||||||
|
|
||||||
if overwrite == 'on':
|
if overwrite == 'on':
|
||||||
|
@ -284,7 +285,7 @@ class TestResult:
|
||||||
time.sleep(2.)
|
time.sleep(2.)
|
||||||
default.add_calculation('sigma','#sigma#*0.0+311.','not the Cauchy stress')
|
default.add_calculation('sigma','#sigma#*0.0+311.','not the Cauchy stress')
|
||||||
with h5py.File(default.fname,'r') as f:
|
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')
|
created_second = datetime.strptime(created_second,'%Y-%m-%d %H:%M:%S%z')
|
||||||
if overwrite == 'on':
|
if overwrite == 'on':
|
||||||
assert created_first < created_second and np.allclose(default.read_dataset(loc),311.)
|
assert created_first < created_second and np.allclose(default.read_dataset(loc),311.)
|
||||||
|
|
Loading…
Reference in New Issue