From 2daf526b84a1e746a222668f02578a2fdba0e992 Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Mon, 25 Sep 2017 14:07:34 +0200 Subject: o Better implementation of EeVal's __eq__ and __lt__. --- test/test_EeVal.py | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 test/test_EeVal.py (limited to 'test') diff --git a/test/test_EeVal.py b/test/test_EeVal.py new file mode 100644 index 0000000..c4254fb --- /dev/null +++ b/test/test_EeVal.py @@ -0,0 +1,9 @@ +from ee import EeVal + +def test_ordering(): + p100 = EeVal('100 p') + n100 = EeVal('100 n') + u1 = EeVal('1u') + assert n100 > p100 + assert p100 < n100 + assert [p100, n100, u1] == sorted([p100, u1, n100]) -- cgit v1.2.3