File tree Expand file tree Collapse file tree 2 files changed +37
-38
lines changed
Expand file tree Collapse file tree 2 files changed +37
-38
lines changed Original file line number Diff line number Diff line change 1+ from cstring import cstring
2+
3+
4+ def test_eq ():
5+ a = cstring ('hello' )
6+ b = cstring ('hello' )
7+ assert a is not b
8+ assert a == b
9+
10+
11+ def test_neq ():
12+ assert cstring ('hello' ) != cstring ('world' )
13+
14+
15+ def test_ne ():
16+ assert cstring ('hello' ) != cstring ('world' )
17+
18+
19+ def test_lt ():
20+ assert cstring ('a' ) < cstring ('b' )
21+ assert cstring ('a' ) < cstring ('aa' )
22+
23+
24+ def test_le ():
25+ assert cstring ('a' ) <= cstring ('a' )
26+ assert cstring ('a' ) <= cstring ('b' )
27+
28+
29+ def test_gt ():
30+ assert cstring ('b' ) > cstring ('a' )
31+ assert cstring ('aa' ) > cstring ('a' )
32+
33+
34+ def test_ge ():
35+ assert cstring ('a' ) >= cstring ('a' )
36+ assert cstring ('b' ) >= cstring ('a' )
37+
Original file line number Diff line number Diff line change @@ -12,41 +12,3 @@ def test_hash():
1212 assert a is not b
1313 assert set ((a , b )) == set ((a ,)) == set ((b ,))
1414
15-
16- # Rich Compare
17-
18-
19- def test_eq ():
20- a = cstring ('hello' )
21- b = cstring ('hello' )
22- assert a is not b
23- assert a == b
24-
25-
26- def test_neq ():
27- assert cstring ('hello' ) != cstring ('world' )
28-
29-
30- def test_ne ():
31- assert cstring ('hello' ) != cstring ('world' )
32-
33-
34- def test_lt ():
35- assert cstring ('a' ) < cstring ('b' )
36- assert cstring ('a' ) < cstring ('aa' )
37-
38-
39- def test_le ():
40- assert cstring ('a' ) <= cstring ('a' )
41- assert cstring ('a' ) <= cstring ('b' )
42-
43-
44- def test_gt ():
45- assert cstring ('b' ) > cstring ('a' )
46- assert cstring ('aa' ) > cstring ('a' )
47-
48-
49- def test_ge ():
50- assert cstring ('a' ) >= cstring ('a' )
51- assert cstring ('b' ) >= cstring ('a' )
52-
You can’t perform that action at this time.
0 commit comments