Skip to content
Snippets Groups Projects

fix memory layout descriptor parsing (v2.0-dev edition)

Merged Frederik Hennig requested to merge fhennig/fix-field-memory-descriptors into v2.0-dev
Viewing commit 6ff280a8
Prev
Show latest version
1 file
+ 16
0
Preferences
Compare changes
@@ -205,6 +205,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 (
@@ -229,6 +237,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():