From 4ccd068d3bb3495853d76da6dbc87ce8c90fd817 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Thu, 5 Nov 2020 23:00:56 +0100 Subject: [PATCH] catch error in case of exisiting dataset --- python/tests/test_Result.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python/tests/test_Result.py b/python/tests/test_Result.py index 09f4ba46b..dffb08623 100644 --- a/python/tests/test_Result.py +++ b/python/tests/test_Result.py @@ -309,7 +309,10 @@ class TestResult: default.disallow_modification() time.sleep(2.) - default.add_calculation('sigma','#sigma#*0.0+311.','not the Cauchy stress') + try: + default.add_calculation('sigma','#sigma#*0.0+311.','not the Cauchy stress') + except ValueError: + pass with h5py.File(default.fname,'r') as f: # h5py3 compatibility try: