ManyTests.py 533 B

123456789101112131415161718
  1. from lit import Test
  2. class ManyTests(object):
  3. def __init__(self, N=10000):
  4. self.N = N
  5. def getTestsInDirectory(self, testSuite, path_in_suite, litConfig, localConfig):
  6. for i in range(self.N):
  7. test_name = "test-%04d" % (i,)
  8. yield Test.Test(testSuite, path_in_suite + (test_name,), localConfig)
  9. def execute(self, test, litConfig):
  10. # Do a "non-trivial" amount of Python work.
  11. sum = 0
  12. for i in range(10000):
  13. sum += i
  14. return Test.PASS, ""