From 3555853dddfb8ac2531f4e0e5737c6b4ba20f111 Mon Sep 17 00:00:00 2001 From: Frederik Hennig <frederik.hennig@fau.de> Date: Wed, 18 Dec 2024 10:33:01 +0100 Subject: [PATCH] add failing tests --- tests/test_field.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tests/test_field.py b/tests/test_field.py index d63ead8ad..a2ba1092b 100644 --- a/tests/test_field.py +++ b/tests/test_field.py @@ -197,6 +197,14 @@ def test_spatial_memory_layout_descriptors(): == (0, 1, 2) ) + assert spatial_layout_string_to_tuple("C", 5) == (0, 1, 2, 3, 4) + + with pytest.raises(ValueError): + spatial_layout_string_to_tuple("aos", -1) + + with pytest.raises(ValueError): + spatial_layout_string_to_tuple("aos", 4) + def test_memory_layout_descriptors(): assert ( @@ -221,6 +229,14 @@ def test_memory_layout_descriptors(): == (0, 1, 2, 3) ) + assert layout_string_to_tuple("C", 5) == (0, 1, 2, 3, 4) + + with pytest.raises(ValueError): + layout_string_to_tuple("aos", -1) + + with pytest.raises(ValueError): + layout_string_to_tuple("aos", 5) + def test_staggered(): -- GitLab