def _subtest(self, stimulus): sim = Simulator() sim.run() def test_mytest(self): for stimulus in range(10000): self._subtest(stimulus)