def load_tests(loader, tests, pattern):
    suite = TestSuite()
    suite.addTests(defaultTestLoader.loadTestsFromModule(sms_user))
    suite.addTests(defaultTestLoader.loadTestsFromModule(notification))
    suite.addTests(defaultTestLoader.loadTestsFromModule(reply))
    suite.addTests(defaultTestLoader.loadTestsFromModule(registration))
    return suite
Beispiel #2
0
    def run(self):
        try:
            if sys.version_info < (2, 5):
                print("Tests cannot be run on Python 2.4 or earlier")
                exit(-1)
            elif sys.version_info < (2, 7):
                from unittest2 import TextTestRunner, defaultTestLoader
            else:
                from unittest import TextTestRunner, defaultTestLoader

        except ImportError:
            print("Please install Unittest2 to run the test suite")
            exit(-1)

        from tests import test_aspell_python
        suite = defaultTestLoader.loadTestsFromModule(test_aspell_python)
        if sys.version_info < (3,):
            from tests import test_aspell_for_python_2
            suite.addTests(
                defaultTestLoader.loadTestsFromModule(
                    test_aspell_for_python_2))
        else:
            from tests import test_aspell_for_python_3
            suite.addTests(
                defaultTestLoader.loadTestsFromModule(
                    test_aspell_for_python_3))

        runner = TextTestRunner()
        result = runner.run(suite)
        if result.wasSuccessful() is not True:
            raise SystemExit(int(bool(result.errors or result.failures)))
def load_tests(loader, tests, pattern):
    suite = TestSuite()
    suite.addTests(defaultTestLoader.loadTestsFromModule(auth))
    suite.addTests(defaultTestLoader.loadTestsFromModule(models))
    suite.addTests(defaultTestLoader.loadTestsFromModule(requests))
    suite.addTests(defaultTestLoader.loadTestsFromModule(following))
    suite.addTests(defaultTestLoader.loadTestsFromModule(search))
    return suite
Beispiel #4
0
    def run (self):
        """Run the test suite."""
        if self.pdb and self.test != ['test_gdb']:
            print('One can only debug a gdb test case for now.')
            return

        testdir = 'testsuite'
        tests = self.test or findtests(testdir)
        test_prefix = testdir + '.'
        if self.prefix:
            defaultTestLoader.testMethodPrefix = self.prefix
        for test in tests:
            abstest = test_prefix + test
            the_package = __import__(abstest, globals(), locals(), [])
            the_module = getattr(the_package, test)
            suite = defaultTestLoader.loadTestsFromModule(the_module)
            if self.pdb and (len(tests) > 1 or suite.countTestCases() > 1):
                print('Only one test at a time can be debugged, use the'
                      ' \'--test=\' and \'--prefix=\' options to set'
                      ' this test.')
                return
            if test == 'test_gdb':
                misc.check_call(['make', '-C', 'testsuite'])
            # run the test
            print abstest
            sys.stdout.flush()
            test_support.run_suite(suite, self.detail, self.stop, self.pdb)
def load_tests(loader, tests, pattern):
    suite = TestSuite()
    suite.addTests(defaultTestLoader.loadTestsFromModule(server_running))
    suite.addTests(defaultTestLoader.loadTestsFromModule(db))
    suite.addTests(defaultTestLoader.loadTestsFromModule(users))
    suite.addTests(defaultTestLoader.loadTestsFromModule(notification))
    suite.addTests(defaultTestLoader.loadTestsFromModule(events))
    suite.addTests(defaultTestLoader.loadTestsFromModule(SMS))
    suite.addTests(defaultTestLoader.loadTestsFromModule(utils))
    suite.addTests(defaultTestLoader.loadTestsFromModule(social))
    return suite
def load_tests(loader, tests, pattern):
    suite = TestSuite()
    suite.addTests(defaultTestLoader.loadTestsFromModule(models))
    suite.addTests(defaultTestLoader.loadTestsFromModule(new))
    suite.addTests(defaultTestLoader.loadTestsFromModule(comments))
    suite.addTests(defaultTestLoader.loadTestsFromModule(notification))
    suite.addTests(defaultTestLoader.loadTestsFromModule(lists))
    suite.addTests(defaultTestLoader.loadTestsFromModule(attendants))
    suite.addTests(defaultTestLoader.loadTestsFromModule(invites))
    return suite
Beispiel #7
0
def suite():
    import teleport_test, language_test
    main = defaultTestLoader.loadTestsFromModule(teleport_test)
    language = language_test.suite()
    return TestSuite([main, language])
def load_tests(loader, tests, pattern):
    suite = TestSuite()
    suite.addTests(defaultTestLoader.loadTestsFromModule(models))
    return suite
def load_tests(loader, tests, pattern):
    suite = TestSuite()
    suite.addTests(defaultTestLoader.loadTestsFromModule(generic_poll))
    return suite
Beispiel #10
0
def suite():
    import teleport_test, language_test
    main = defaultTestLoader.loadTestsFromModule(teleport_test)
    language = language_test.suite()
    return TestSuite([main, language])
Beispiel #11
0
def load_tests(loader, tests, pattern):
    suite = TestSuite()
    suite.addTests(defaultTestLoader.loadTestsFromModule(dates))
    suite.addTests(defaultTestLoader.loadTestsFromModule(phone_numbers))
    return suite