Ejemplo n.º 1
0
class LineUt(unittest.TestCase):
    '''Line Unit Test'''

    def setUp(self):
        "Create test points"
        start=Point(1,1)
        end=Point(4,5)
        self.line=Line(start,end)        

    def test_distance(self):
        self.assertEqual(5,self.line.distance(),'distance shoud be 5')
        
    def test_in_list(self):
        x = ['aa','xx','yy']
        if 'xx' in x:
            print 'ok in!'
Ejemplo n.º 2
0
 def setUp(self):
     "Create test points"
     start=Point(1,1)
     end=Point(4,5)
     self.line=Line(start,end)