Exemplo n.º 1
0
 def test_startTest_stopTest(self):
     t = TestStub()
     r = JubaTestResult()
     r.startTest(t)
     time.sleep(1)
     r.stopTest(t)
     self.assertAlmostEqual(1.0, t.timeTaken, places=2)
Exemplo n.º 2
0
 def test_addSuccess(self):
     t = TestStub()
     r = JubaTestResult()
     r.startTest(t)
     r.stopTest(t)
     r.addSuccess(t)
     self.assertEqual(1, len(r.successes))
     self.assertEqual(t, r.successes[0])
Exemplo n.º 3
0
 def test_addSuccess(self):
     t = TestStub()
     r = JubaTestResult()
     r.startTest(t)
     r.stopTest(t)
     r.addSuccess(t)
     self.assertEqual(1, len(r.successes))
     self.assertEqual(t, r.successes[0])
Exemplo n.º 4
0
 def test_startTest_stopTest(self):
     t = TestStub()
     r = JubaTestResult()
     r.startTest(t)
     time.sleep(1)
     r.stopTest(t)
     self.assertAlmostEqual(1.0, t.timeTaken, places=2)