From 83ce033d6413b44bc30d52043b138b449b2db3c2 Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Mon, 25 Sep 2017 14:48:05 +0200 Subject: o Making EeVal hashable. --- test/test_EeVal.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'test') diff --git a/test/test_EeVal.py b/test/test_EeVal.py index c4254fb..b96e089 100644 --- a/test/test_EeVal.py +++ b/test/test_EeVal.py @@ -7,3 +7,10 @@ def test_ordering(): assert n100 > p100 assert p100 < n100 assert [p100, n100, u1] == sorted([p100, u1, n100]) + +def test_hash(): + p100 = EeVal('100 p') + n100 = EeVal('100 n') + u1 = EeVal('1u') + + assert 3 == len(set([p100, p100, n100, u1])) -- cgit v1.2.3