Beispiel #1
0
 def testReporterMethod(self, reporter):
     fake_runner = self.MyRunner()
     mp_reporter = runner.MReporter(fake_runner, reporter)
     my_task = Task("task x", [])
     mp_reporter.add_success(my_task)
     got = fake_runner.result_q.get(True, 1)
     assert {'name': "task x", "reporter": 'add_success'} == got
Beispiel #2
0
 def testReporterMethod(self, reporter):
     fake_runner = self.MyRunner()
     mp_reporter = runner.MReporter(fake_runner, reporter)
     my_task = Task("task x", [])
     mp_reporter.add_success(my_task)
     # note limit is 2 seconds because of http://bugs.python.org/issue17707
     got = fake_runner.result_q.get(True, 2)
     assert {'name': "task x", "reporter": 'add_success'} == got
Beispiel #3
0
 def testNonReporterMethod(self, reporter):
     fake_runner = self.MyRunner()
     mp_reporter = runner.MReporter(fake_runner, reporter)
     assert hasattr(mp_reporter, 'add_success')
     assert not hasattr(mp_reporter, 'no_existent_method')