-
Notifications
You must be signed in to change notification settings - Fork 16
/
CardTest.py
53 lines (38 loc) · 911 Bytes
/
CardTest.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
from Card import Card
'''
Tests different cards for (in)equality using a
unit test like format. Shows correctness of the operators,
which compare cards relative to each others' ranks.
'''
print 'Starting Card opertor tests...\n'
clubs = 0
diamonds = 1
spades = 2
hearts = 3
# c = Card(2, hearts)
# c1 = Card(13, spades)
# print 'c:', c
# print 'c1:', c1
# print "c == c1", c == c1
# print "c >= c1", c >= c1
# print "c <= c1", c <= c1
# print "c < c1", c < c1
# print "c > c1", c > c1
# c = Card(12, diamonds)
# c1 = Card(7, clubs)
# print '\nc:', c
# print 'c1:', c1
# print "c == c1", c == c1
# print "c >= c1", c >= c1
# print "c <= c1", c <= c1
# print "c < c1", c < c1
# print "c > c1", c > c1
c = Card(12, diamonds)
c1 = Card(12, clubs)
print '\nc:', c
print 'c1:', c1
print "c == c1", c == c1
print "c >= c1", c >= c1
print "c <= c1", c <= c1
print "c < c1", c < c1
print "c > c1", c > c1