From d3c617fb5be979f574bbb5930ff54b83d999ec34 Mon Sep 17 00:00:00 2001 From: DNIIBOY Date: Sat, 24 Feb 2024 21:22:30 +0100 Subject: [PATCH] Add passing test case --- chempy/chemistry.py | 2 +- chempy/tests/test_chemistry.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/chempy/chemistry.py b/chempy/chemistry.py index 85685827..5e45ea3a 100644 --- a/chempy/chemistry.py +++ b/chempy/chemistry.py @@ -104,7 +104,7 @@ def __hash__(self) -> int: hash, ( getattr(self, k) - for k in self.attrs + for k in ("name", "latex_name", "unicode_name", "html_name") ), ) ) diff --git a/chempy/tests/test_chemistry.py b/chempy/tests/test_chemistry.py index 8c5aa811..ec823837 100644 --- a/chempy/tests/test_chemistry.py +++ b/chempy/tests/test_chemistry.py @@ -40,6 +40,7 @@ def test_Substance(): assert s.composition == {0: 1, 1: 1} assert s.charge == 1 assert abs(s.mass - 1.008) < 1e-3 + assert s in {s: 1} def test_Substance__2():