Exemple #1
0
  def build_suite(self, test_labels, extra_tests=None, **kwargs):
    if not test_labels:
      return super(TeleduTestRunner, self).build_suite(test_labels, extra_tests, **kwargs)

    suite = TestSuite()

    for label in test_labels:
      parts = label.split('.')
      if parts[0].lower() == 'teledu':
        if len(parts) < 2:
          suite.addTest(unittest.TestLoader().discover(start_dir = self.testPath, pattern = 'when*.py'))
        else:
          suite.addTest(self._loadTestsFromLabel(parts[1]))
      else:
        if '.' in label:
          suite.addTest(build_test(label))
        else:
          app = get_app(label)
          suite.addTest(build_suite(app))

    if extra_tests:
      for test in extra_tests:
        suite.addTest(test)

    return suite
Exemple #2
0
def changes_suite():
    suite = TestSuite()
    suite.addTest(unittest.TestLoader().loadTestsFromTestCase(
        ChangesMixinTest))
    return suite
Exemple #3
0
def changes_suite():
    suite = TestSuite()
    suite.addTest(
        unittest.TestLoader().loadTestsFromTestCase(ChangesMixinTest))
    return suite
Exemple #4
0
def suite():
    suite = TestSuite()

    suite.addTest(changes_suite())

    return suite