コード例 #1
0
ファイル: ut_line.py プロジェクト: vollov/py-lab
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!'
コード例 #2
0
ファイル: ut_line.py プロジェクト: vollov/py-lab
 def setUp(self):
     "Create test points"
     start=Point(1,1)
     end=Point(4,5)
     self.line=Line(start,end)