diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2017-09-25 14:48:05 +0200 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2017-09-25 14:48:05 +0200 |
commit | 83ce033d6413b44bc30d52043b138b449b2db3c2 (patch) | |
tree | 6b40385f1350c61c8f59d74ee2f57c8eddd6a738 /test | |
parent | 2daf526b84a1e746a222668f02578a2fdba0e992 (diff) | |
download | ee-python-83ce033d6413b44bc30d52043b138b449b2db3c2.tar.gz ee-python-83ce033d6413b44bc30d52043b138b449b2db3c2.tar.bz2 ee-python-83ce033d6413b44bc30d52043b138b449b2db3c2.tar.xz ee-python-83ce033d6413b44bc30d52043b138b449b2db3c2.zip |
o Making EeVal hashable.
Diffstat (limited to 'test')
-rw-r--r-- | test/test_EeVal.py | 7 |
1 files changed, 7 insertions, 0 deletions
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])) |