~romaia/pydojo/trunk

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
import unittest


def roman2deciman(rom):
    return len(rom)

    if rom == 'I':
        return 1
    else:
        return 2

class StubTests(unittest.TestCase):
    def testFoo(self):
        self.assertEquals(roman2deciman('I'), 1)
        self.assertEquals(roman2deciman('II'), 2)
        self.assertEquals(roman2deciman('III'), 3)

    def testBar(self):
        return
        self.assertEquals(roman2deciman('IV'), 4)




if __name__ == '__main__':
    unittest.main()