MCPcopy Create free account
hub / github.com/nodejs/node / FakeTimeoutProc

Class FakeTimeoutProc

deps/v8/tools/testrunner/standard_runner_test.py:600–618  ·  view source on GitHub ↗

Fake of the total-timeout observer that just stops after counting "count" number of test or result events.

Source from the content-addressed store, hash-verified

598
599
600class FakeTimeoutProc(base.TestProcObserver):
601 """Fake of the total-timeout observer that just stops after counting
602 "count" number of test or result events.
603 """
604 def __init__(self, count):
605 super(FakeTimeoutProc, self).__init__()
606 self._n = 0
607 self._count = count
608
609 def _on_next_test(self, test):
610 self.__on_event()
611
612 def _on_result_for(self, test, result):
613 self.__on_event()
614
615 def __on_event(self):
616 if self._n >= self._count:
617 self.stop()
618 self._n += 1
619
620
621class NumFuzzerTest(TestRunnerTest):

Callers 2

testNumFuzzerMethod · 0.85

Calls

no outgoing calls

Tested by 2

testNumFuzzerMethod · 0.68