Skip to content

Commit

Permalink
#2271 address coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
arporter committed Jan 7, 2025
1 parent 3bab6b7 commit e389463
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/psyclone/domain/lfric/lfric_extract_driver_creator.py
Original file line number Diff line number Diff line change
Expand Up @@ -594,10 +594,6 @@ def _sym_is_field(sym):
else:
orig_sym = original_symbol_table.lookup(signature[0])

if orig_sym and isinstance(orig_sym, DataTypeSymbol):
# We don't want symbols representing data types.
continue

if orig_sym and orig_sym.is_array and _sym_is_field(orig_sym):
# This is a field vector, so add all individual fields
upper = int(orig_sym.datatype.shape[0].upper.value)
Expand Down
5 changes: 5 additions & 0 deletions src/psyclone/tests/core/single_variable_access_info_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,11 @@ def test_variable_access_info():
assert vai.is_read_only() is False
assert vai.all_read_accesses == [vai[2]]
assert vai.all_write_accesses == [vai[1], vai[3]]
# Check that we catch a case where there are no accesses at all.
vai = SingleVariableAccessInfo(Signature("var_name"))
with pytest.raises(InternalError) as err:
vai.change_read_to_write()
assert "but it does not have a 'READ' access" in str(err.value)


# -----------------------------------------------------------------------------
Expand Down

0 comments on commit e389463

Please sign in to comment.