• Facebook
  • Twitter
  • Reddit
  • StumbleUpon
  • Digg
  • email

All Samples(63701)  |  Call(17)  |  Derive(59898)  |  Import(3786)
A class whose instances are single test cases.

By default, the test code itself should be placed in a method named
'runTest'.

If the fixture may be used for many test cases, create as
many test methods as are needed. When instantiating such a TestCase
subclass, specify in the constructor arguments the name of the test method
that the instance is to execute.

Test authors should subclass TestCase for their own tests. Construction
and deconstruction of the test's environment ('fixture') can be
implemented by overriding the 'setUp' and 'tearDown' methods respectively.

If it is necessary to override the __init__ method, the base class
__init__ method must always be called. It is important that subclasses
should not change the signature of their __init__ method, since instances
of the classes are instantiated automatically by parts of the framework
in order to be run.

src/s/a/sage-HEAD/trunk/local/lib/python2.4/site-packages/zope/testing/testrunner-ex/sampletestsf.py   sage(Download)
class TestA(unittest.TestCase):
    def setUp(self):
        global x
        x = 1
    def tearDown(self):
        global x
        x = 0
class TestA2(unittest.TestCase):
    level = 2
 
    def setUp(self):
        global x
        x = 1
    def tearDown(self):
class TestB(unittest.TestCase):
    def setUp(self):
        global y
        y = 1
    def tearDown(self):
        global y
        y = 0
class TestNotMuch(unittest.TestCase):
    def test_1(self):
        pass
    def test_2(self):
        pass
    def test_3(self):
        pass
class TestA1(unittest.TestCase, Layered):
 
    def setUp(self):
        global x
        x = 1
    def tearDown(self):
        global x
class TestB1(unittest.TestCase, Layered):
    def setUp(self):
        global y
        y = 1
    def tearDown(self):
        global y
        y = 0
class TestNotMuch1(unittest.TestCase, Layered):
    def test_1(self):
        self.assertEqual(samplelayers.layer, self.layerv)
        self.assertEqual(samplelayers.layerx, self.layerx)
    def test_2(self):
        self.assertEqual(samplelayers.layer, self.layerv)
        self.assertEqual(samplelayers.layerx, self.layerx)

src/s/a/sage-HEAD/local/lib/python2.4/site-packages/zope/testing/testrunner-ex/sampletestsf.py   sage(Download)
class TestA(unittest.TestCase):
    def setUp(self):
        global x
        x = 1
    def tearDown(self):
        global x
        x = 0
class TestA2(unittest.TestCase):
    level = 2
 
    def setUp(self):
        global x
        x = 1
    def tearDown(self):
class TestB(unittest.TestCase):
    def setUp(self):
        global y
        y = 1
    def tearDown(self):
        global y
        y = 0
class TestNotMuch(unittest.TestCase):
    def test_1(self):
        pass
    def test_2(self):
        pass
    def test_3(self):
        pass
class TestA1(unittest.TestCase, Layered):
 
    def setUp(self):
        global x
        x = 1
    def tearDown(self):
        global x
class TestB1(unittest.TestCase, Layered):
    def setUp(self):
        global y
        y = 1
    def tearDown(self):
        global y
        y = 0
class TestNotMuch1(unittest.TestCase, Layered):
    def test_1(self):
        self.assertEqual(samplelayers.layer, self.layerv)
        self.assertEqual(samplelayers.layerx, self.layerx)
    def test_2(self):
        self.assertEqual(samplelayers.layer, self.layerv)
        self.assertEqual(samplelayers.layerx, self.layerx)

src/s/a/sage-HEAD/trunk/local/lib/python2.4/site-packages/zope/testing/testrunner-ex/sample2/sampletests_ntd.py   sage(Download)
class TestSomething(unittest.TestCase):
 
    layer = Layer
 
    def test_something(self):
        pass
 

src/s/a/sage-HEAD/trunk/local/lib/python2.4/site-packages/zope/testing/testrunner-ex/sample1/sampletests_ntds.py   sage(Download)
class TestSomething(unittest.TestCase):
 
    layer = Layer
 
    def test_something(self):
        pass
 

src/s/a/sage-HEAD/trunk/local/lib/python2.4/site-packages/zope/testing/testrunner-ex/sample1/sampletests_ntd.py   sage(Download)
class TestSomething(unittest.TestCase):
 
    layer = Layer
 
    def test_something(self):
        pass
 

src/s/a/sage-HEAD/local/lib/python2.4/site-packages/zope/testing/testrunner-ex/sample2/sampletests_ntd.py   sage(Download)
class TestSomething(unittest.TestCase):
 
    layer = Layer
 
    def test_something(self):
        pass
 

src/s/a/sage-HEAD/local/lib/python2.4/site-packages/zope/testing/testrunner-ex/sample1/sampletests_ntds.py   sage(Download)
class TestSomething(unittest.TestCase):
 
    layer = Layer
 
    def test_something(self):
        pass
 

src/s/a/sage-HEAD/local/lib/python2.4/site-packages/zope/testing/testrunner-ex/sample1/sampletests_ntd.py   sage(Download)
class TestSomething(unittest.TestCase):
 
    layer = Layer
 
    def test_something(self):
        pass
 

src/z/e/zenoss-HEAD/trunk/Products/Five/testing/testrunner-ex/sampletestsf.py   zenoss(Download)
class TestA(unittest.TestCase):
    def setUp(self):
        global x
        x = 1
    def tearDown(self):
        global x
        x = 0
class TestA2(unittest.TestCase):
    level = 2
 
    def setUp(self):
        global x
        x = 1
    def tearDown(self):
class TestB(unittest.TestCase):
    def setUp(self):
        global y
        y = 1
    def tearDown(self):
        global y
        y = 0
class TestNotMuch(unittest.TestCase):
    def test_1(self):
        pass
    def test_2(self):
        pass
    def test_3(self):
        pass
class TestA1(unittest.TestCase, Layered):
 
    def setUp(self):
        global x
        x = 1
    def tearDown(self):
        global x
class TestB1(unittest.TestCase, Layered):
    def setUp(self):
        global y
        y = 1
    def tearDown(self):
        global y
        y = 0
class TestNotMuch1(unittest.TestCase, Layered):
    def test_1(self):
        self.assertEqual(samplelayers.layer, self.layerv)
        self.assertEqual(samplelayers.layerx, self.layerx)
    def test_2(self):
        self.assertEqual(samplelayers.layer, self.layerv)
        self.assertEqual(samplelayers.layerx, self.layerx)

src/z/e/zenoss-HEAD/Products/Five/testing/testrunner-ex/sampletestsf.py   zenoss(Download)
class TestA(unittest.TestCase):
    def setUp(self):
        global x
        x = 1
    def tearDown(self):
        global x
        x = 0
class TestA2(unittest.TestCase):
    level = 2
 
    def setUp(self):
        global x
        x = 1
    def tearDown(self):
class TestB(unittest.TestCase):
    def setUp(self):
        global y
        y = 1
    def tearDown(self):
        global y
        y = 0
class TestNotMuch(unittest.TestCase):
    def test_1(self):
        pass
    def test_2(self):
        pass
    def test_3(self):
        pass
class TestA1(unittest.TestCase, Layered):
 
    def setUp(self):
        global x
        x = 1
    def tearDown(self):
        global x
class TestB1(unittest.TestCase, Layered):
    def setUp(self):
        global y
        y = 1
    def tearDown(self):
        global y
        y = 0
class TestNotMuch1(unittest.TestCase, Layered):
    def test_1(self):
        self.assertEqual(samplelayers.layer, self.layerv)
        self.assertEqual(samplelayers.layerx, self.layerx)
    def test_2(self):
        self.assertEqual(samplelayers.layer, self.layerv)
        self.assertEqual(samplelayers.layerx, self.layerx)

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