Add test coverage of status class

This commit is contained in:
Veronica Berglyd Olsen
2024-04-10 22:19:15 +02:00
parent adfd003532
commit d1dbb0b378
3 changed files with 146 additions and 78 deletions
+5 -2
View File
@@ -57,8 +57,11 @@ class StatusEntry:
@classmethod
def duplicate(cls, source: StatusEntry) -> StatusEntry:
"""Create a shallow copy of the source object."""
return dataclasses.replace(source)
"""Create a deep copy of the source object."""
cls = dataclasses.replace(source)
cls.color = QColor(source.color)
cls.icon = QIcon(source.icon)
return cls
# END Class StatusEntry