diff --git a/lbmpy_tests/test_lbstep.py b/lbmpy_tests/test_lbstep.py index e4903446cab66c615b4a64030bf23016838fa146..7d6d395c37a68786cb80eb236e1df8c4e2d799e2 100644 --- a/lbmpy_tests/test_lbstep.py +++ b/lbmpy_tests/test_lbstep.py @@ -92,7 +92,7 @@ def test_advanced_initialization(): shear_flow_scenario = create_fully_periodic_flow(initial_velocity=init_vel, relaxation_rate=1.95) with pytest.raises(ValueError) as e: shear_flow_scenario.run_iterative_initialization(max_steps=20000, check_residuum_after=500) - assert 'did not converge' in str(e) + assert 'did not converge' in str(e.value) shear_flow_scenario = create_fully_periodic_flow(initial_velocity=init_vel, relaxation_rate=1.6) shear_flow_scenario.run_iterative_initialization(max_steps=20000, check_residuum_after=500) diff --git a/lbmpy_tests/test_relaxation_rate.py b/lbmpy_tests/test_relaxation_rate.py index 1d8fb6a08c686c8164f43396240dc496e8a03334..39ce0825efe9a79de536a342dcb2fe78520da329 100644 --- a/lbmpy_tests/test_relaxation_rate.py +++ b/lbmpy_tests/test_relaxation_rate.py @@ -9,7 +9,7 @@ def test_relaxation_rate(): relaxation_rates=[1 + i / 10 for i in range(19)]) with pytest.raises(ValueError) as e: get_shear_relaxation_rate(method) - assert 'Shear moments are relaxed with different relaxation' in str(e) + assert 'Shear moments are relaxed with different relaxation' in str(e.value) method = create_lb_method(stencil="D2Q9", method='mrt_raw', relaxation_rates=[1 + i / 10 for i in range(9)]) diff --git a/lbmpy_tests/test_stencils.py b/lbmpy_tests/test_stencils.py index 253c321bed02851d6191442fed7afced6a6efe7c..eb07afc57ebacfabc367bfdf011195ef545ed834 100644 --- a/lbmpy_tests/test_stencils.py +++ b/lbmpy_tests/test_stencils.py @@ -67,7 +67,7 @@ def test_free_functions(): with pytest.raises(ValueError) as e: get_stencil("name_that_does_not_exist") - assert "No such stencil" in str(e) + assert "No such stencil" in str(e.value) def test_visualize():