Пример #1
0
class TestProgress(TestCase):
    def setUp(self):
        self.p = Progress(n=1002, percent=10)

    def test_progress_counter(self):
        total = 0
        for i in range(0, 1002):
            total += self.p.show(message='Testing progress:', silent=True)
        self.assertEqual(total, 10)
Пример #2
0
class TestProgress(TestCase):

    def setUp(self):
        self.p = Progress(n=1002, percent=10)

    def test_progress_counter(self):
        total = 0
        for i in range(0,1002):
            total += self.p.show(message='Testing progress:', silent=True)
        self.assertEqual(total,10)   
Пример #3
0
class TestProgress(unittest.TestCase):
    def setUp(self):
        self.p = Progress(n=1002, percent=10)

    def test_add_doc(self):
        # Try we should get 10 ones
        total = 0
        print '\n'
        for i in range(0, 1002):
            total += self.p.show(message='Testing progress:')
        print 'total:', total
        self.assertEqual(total, 10)
Пример #4
0
class TestProgress(unittest.TestCase):

    def setUp(self):
        self.p = Progress(n=1002, percent=10)

    def test_add_doc(self):
        # Try we should get 10 ones
        total = 0
        print '\n'
        for i in range(0,1002):
            total += self.p.show(message='Testing progress:')
        print 'total:', total
        self.assertEqual(total,10)   
Пример #5
0
 def setUp(self):
     self.p = Progress(n=1002, percent=10)
Пример #6
0
 def setUp(self):
     self.p = Progress(n=1002, percent=10)