From d0dfb8bd7ce3085038296885bf62deef62677e21 Mon Sep 17 00:00:00 2001
From: Stephan Seitz <stephan.seitz@fau.de>
Date: Fri, 2 Aug 2019 15:53:41 +0200
Subject: [PATCH] Implement __eq__ for AssignmentCollection

---
 pystencils/simp/assignment_collection.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/pystencils/simp/assignment_collection.py b/pystencils/simp/assignment_collection.py
index da48324..8e99d5d 100644
--- a/pystencils/simp/assignment_collection.py
+++ b/pystencils/simp/assignment_collection.py
@@ -385,6 +385,9 @@ class AssignmentCollection:
             subexpressions=[a.replace(*args, **kwargs) for a in self.subexpressions]
         )
 
+    def __eq__(self, other):
+        return set(self.all_assignments) == set(other.all_assignments)
+
 
 class SymbolGen:
     """Default symbol generator producing number symbols ζ_0, ζ_1, ..."""
-- 
GitLab