Skip to content

Commit cf24650

Browse files
committed
Support addition of MappingView
1 parent 5aeebbe commit cf24650

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

reframe/utility/__init__.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1473,3 +1473,11 @@ def __repr__(self):
14731473

14741474
def __str__(self):
14751475
return str(self.__mapping)
1476+
1477+
def __add__(self, other):
1478+
if not isinstance(other, type(self)):
1479+
return NotImplemented
1480+
1481+
new_mapping = self.__mapping.copy()
1482+
new_mapping.update(other.__mapping)
1483+
return MappingView(new_mapping)

0 commit comments

Comments
 (0)