コード例 #1
0
 def test_event_calender_valid(self):
     """
     func that test for invalid calender date
     :rtype: object
     """
     result = event_calender('January 2010')
     self.assertEqual(result, ' project start')
コード例 #2
0
 def test_event_calender_invalid(self):
     """
     func that test for invalid calender date
     :rtype: object
     """
     result = event_calender(2)
     self.assertEqual(result, 'invalid')
コード例 #3
0
 def test_calender2(self):
     """
     func test event_calender method performance
     :param self
     :return: performance event_calender method
     """
     start = time.clock()
     val = event_calender("February 2010")
     proc_time = time.clock() - start
     self.assertTrue(val)
     self.assertLessEqual(proc_time, 0.5)
コード例 #4
0
 def test_calender3(self):
     """
     func test event_calender method performance with error condition
     input string
     :param self
     :return: performance event_calender method
     """
     start = time.clock()
     val = event_calender(2105656)
     proc_time = time.clock() - start
     self.assertTrue(val)
     self.assertLessEqual(proc_time, 0.5)
コード例 #5
0
 def test_calender2(self):
     start = time.clock()
     val = event_calender("February 2010")
     proc_time = time.clock() - start
     self.assertTrue(val)
     self.assertLessEqual(proc_time, 0.5)
コード例 #6
0
 def test_calender3(self):
     start = time.clock()
     val = event_calender(2105656)
     proc_time = time.clock() - start
     self.assertTrue(val)
     self.assertLessEqual(proc_time, 0.5)
コード例 #7
0
 def test_event_calender_valid(self):
     result = event_calender('January 2010')
     self.assertEqual(result, ' project start')
コード例 #8
0
 def test_event_calender_invalid(self):
     result = event_calender(2)
     self.assertEqual(result, 'invalid')