Did I find the right examples for you? yes no

All Samples(516)  |  Call(501)  |  Derive(8)  |  Import(7)
A test case that wraps a test function.

This is useful for slipping pre-existing test functions into the
unittest framework. Optionally, set-up and tidy-up functions can be
supplied. As with TestCase, the tidy-up ('tearDown') function will
always be called if the set-up ('setUp') function ran successfully.

src/d/e/describe-HEAD/describe/spec/containers.py   describe(Download)
import sys
import traceback
from unittest import FunctionTestCase, TestSuite
from itertools import izip_longest
from cStringIO import StringIO
    def unittest_equiv(self, context):
        return FunctionTestCase(self.testfn,
                lambda: self.before(context),
                lambda: self.after(context))
    @property

src/o/h/oh-mainline-HEAD/vendor/packages/mechanize/test/test_unittest.py   oh-mainline(Download)
    def test_loadTestsFromName__callable__TestSuite(self):
        m = types.ModuleType('m')
        testcase_1 = unittest.FunctionTestCase(lambda: None)
        testcase_2 = unittest.FunctionTestCase(lambda: None)
        def return_TestSuite():
    def test_loadTestsFromName__callable__TestCase_instance(self):
        m = types.ModuleType('m')
        testcase_1 = unittest.FunctionTestCase(lambda: None)
        def return_TestCase():
            return testcase_1
    def test_loadTestsFromName__callable__TestCase_instance_ProperSuiteClass(self):
        class SubTestSuite(unittest.TestSuite):
            pass
        m = types.ModuleType('m')
        testcase_1 = unittest.FunctionTestCase(lambda: None)
    def test_loadTestsFromNames__callable__TestSuite(self):
        m = types.ModuleType('m')
        testcase_1 = unittest.FunctionTestCase(lambda: None)
        testcase_2 = unittest.FunctionTestCase(lambda: None)
        def return_TestSuite():

src/o/r/Orange-2.7.2/Orange/testing/testing.py   Orange(Download)
 
    runScript.__name__ = "runScript %s" % os.path.basename(path)
    return unittest.FunctionTestCase(runScript, setUp=setUp, tearDown=tearDown)
 
 

src/p/y/Pymol-script-repo-HEAD/modules/ADT/mglutil/TestUtil/tester.py   Pymol-script-repo(Download)
        for func in functions:
            if not type(func) is types.FunctionType:continue
            ftc.append(unittest.FunctionTestCase(func, setUp=setUp,
                                                 tearDown=tearDown))
        return (modPath, self.suiteClass(ftc))
                p = len(self.testMethodPrefix)
                if name[:p]==self.testMethodPrefix:
                    testsFunc.append(unittest.FunctionTestCase(obj, setUp=setUp,
                                                               tearDown=tearDown))
 
                    tearDownSuite=None
 
            tfc = unittest.FunctionTestCase(obj, setUp=setUp,
                                            tearDown=tearDown)
            ts = self.suiteClass(tests = [tfc,], setUpSuite=setUpSuite,

src/m/e/mechanize-0.2.5/test/test_unittest.py   mechanize(Download)
    def test_loadTestsFromName__callable__TestSuite(self):
        m = types.ModuleType('m')
        testcase_1 = unittest.FunctionTestCase(lambda: None)
        testcase_2 = unittest.FunctionTestCase(lambda: None)
        def return_TestSuite():
    def test_loadTestsFromName__callable__TestCase_instance(self):
        m = types.ModuleType('m')
        testcase_1 = unittest.FunctionTestCase(lambda: None)
        def return_TestCase():
            return testcase_1
    def test_loadTestsFromName__callable__TestCase_instance_ProperSuiteClass(self):
        class SubTestSuite(unittest.TestSuite):
            pass
        m = types.ModuleType('m')
        testcase_1 = unittest.FunctionTestCase(lambda: None)
    def test_loadTestsFromNames__callable__TestSuite(self):
        m = types.ModuleType('m')
        testcase_1 = unittest.FunctionTestCase(lambda: None)
        testcase_2 = unittest.FunctionTestCase(lambda: None)
        def return_TestSuite():

src/m/e/mechanize-HEAD/test/test_unittest.py   mechanize(Download)
    def test_loadTestsFromName__callable__TestSuite(self):
        m = types.ModuleType('m')
        testcase_1 = unittest.FunctionTestCase(lambda: None)
        testcase_2 = unittest.FunctionTestCase(lambda: None)
        def return_TestSuite():
    def test_loadTestsFromName__callable__TestCase_instance(self):
        m = types.ModuleType('m')
        testcase_1 = unittest.FunctionTestCase(lambda: None)
        def return_TestCase():
            return testcase_1
    def test_loadTestsFromName__callable__TestCase_instance_ProperSuiteClass(self):
        class SubTestSuite(unittest.TestSuite):
            pass
        m = types.ModuleType('m')
        testcase_1 = unittest.FunctionTestCase(lambda: None)
    def test_loadTestsFromNames__callable__TestSuite(self):
        m = types.ModuleType('m')
        testcase_1 = unittest.FunctionTestCase(lambda: None)
        testcase_2 = unittest.FunctionTestCase(lambda: None)
        def return_TestSuite():

src/p/y/pylens-1.0.0b6/scripts/run_tests.py   pylens(Download)
  test_suite = unittest.TestSuite()
  for name, test_function in filtered_tests.iteritems() :
    testcase = unittest.FunctionTestCase(test_function, description=name, setUp=test_set_up)
    test_suite.addTest(testcase)
 

src/p/y/pylens-HEAD/scripts/run_tests.py   pylens(Download)
  test_suite = unittest.TestSuite()
  for name, test_function in filtered_tests.iteritems() :
    testcase = unittest.FunctionTestCase(test_function, description=name, setUp=test_set_up)
    test_suite.addTest(testcase)
 

src/i/n/IncPy-HEAD/Lib/test/test_unittest.py   IncPy(Download)
    def test_loadTestsFromName__callable__TestSuite(self):
        m = types.ModuleType('m')
        testcase_1 = unittest.FunctionTestCase(lambda: None)
        testcase_2 = unittest.FunctionTestCase(lambda: None)
        def return_TestSuite():
    def test_loadTestsFromName__callable__TestCase_instance(self):
        m = types.ModuleType('m')
        testcase_1 = unittest.FunctionTestCase(lambda: None)
        def return_TestCase():
            return testcase_1
    def test_loadTestsFromNames__callable__TestSuite(self):
        m = types.ModuleType('m')
        testcase_1 = unittest.FunctionTestCase(lambda: None)
        testcase_2 = unittest.FunctionTestCase(lambda: None)
        def return_TestSuite():

src/s/l/SlopPy-HEAD/Lib/test/test_unittest.py   SlopPy(Download)
    def test_loadTestsFromName__callable__TestSuite(self):
        m = types.ModuleType('m')
        testcase_1 = unittest.FunctionTestCase(lambda: None)
        testcase_2 = unittest.FunctionTestCase(lambda: None)
        def return_TestSuite():
    def test_loadTestsFromName__callable__TestCase_instance(self):
        m = types.ModuleType('m')
        testcase_1 = unittest.FunctionTestCase(lambda: None)
        def return_TestCase():
            return testcase_1
    def test_loadTestsFromNames__callable__TestSuite(self):
        m = types.ModuleType('m')
        testcase_1 = unittest.FunctionTestCase(lambda: None)
        testcase_2 = unittest.FunctionTestCase(lambda: None)
        def return_TestSuite():

  1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9  Next