Package trac :: Package tests :: Module core :: Class ComponentTestCase

Class ComponentTestCase

source code

            object --+    
                     |    
unittest.case.TestCase --+
                         |
                        ComponentTestCase

Nested Classes

Inherited from unittest.case.TestCase: failureException

Instance Methods
 
setUp(self)
Hook method for setting up the test fixture before exercising it.
source code
 
tearDown(self)
Hook method for deconstructing the test fixture after testing it.
source code
 
test_base_class_not_registered(self)
Make sure that the Component base class does not appear in the component registry.
source code
 
test_abstract_component_not_registered(self)
Make sure that a Component class marked as abstract does not appear in the component registry.
source code
 
test_unregistered_component(self)
Make sure the component manager refuses to manage classes not derived from Component.
source code
 
test_component_registration(self)
Verify that classes derived from Component are managed by the component manager.
source code
 
test_component_identity(self)
Make sure instantiating a component multiple times just returns the same instance again.
source code
 
test_component_initializer(self)
Makes sure that a components' __init__ method gets called.
source code
 
test_inherited_component_initializer(self)
Makes sure that a the __init__ method of a components' super-class gets called if the component doesn't override it.
source code
 
test_implements_called_outside_classdef(self)
Verify that calling implements() outside a class definition raises an AssertionError.
source code
 
test_implements_multiple(self)
Verify that a component "implementing" an interface more than once (e.g.
source code
 
test_attribute_access(self)
Verify that accessing undefined attributes on components raises an AttributeError.
source code
 
test_nonconforming_extender(self)
Verify that accessing a method of a declared extension point interface raises a normal AttributeError if the component does not implement the method.
source code
 
test_extension_point_with_no_extension(self)
Verify that accessing an extension point with no extenders returns an empty list.
source code
 
test_extension_point_with_one_extension(self)
Verify that a single component extending an extension point can be accessed through the extension point attribute of the declaring component.
source code
 
test_extension_point_with_two_extensions(self)
Verify that two components extending an extension point can be accessed through the extension point attribute of the declaring component.
source code
 
test_inherited_extension_point(self)
Verify that extension points are inherited to sub-classes.
source code
 
test_inherited_implements(self)
Verify that a component with a super-class implementing an extension point interface is also registered as implementing that interface.
source code
 
test_inherited_implements_multilevel(self)
Verify that extension point interfaces are inherited for more than one level of inheritance.
source code
 
test_component_manager_component(self)
Verify that a component manager can itself be a component with its own extension points.
source code
 
test_component_manager_component_isolation(self)
Verify that a component manager that is also a component will only be listed in extension points for components instantiated in its scope.
source code
 
test_instantiation_doesnt_enable(self)
Make sure that a component disabled by the ComponentManager is not implicitly enabled by instantiating it directly.
source code
 
test_invalid_argument_raises(self)
AssertionError is raised when first argument to initializer is not a ComponentManager instance.
source code

Inherited from unittest.case.TestCase: __call__, __eq__, __hash__, __init__, __ne__, __repr__, __str__, addCleanup, addTypeEqualityFunc, assertAlmostEqual, assertAlmostEquals, assertDictContainsSubset, assertDictEqual, assertEqual, assertEquals, assertFalse, assertGreater, assertGreaterEqual, assertIn, assertIs, assertIsInstance, assertIsNone, assertIsNot, assertIsNotNone, assertItemsEqual, assertLess, assertLessEqual, assertListEqual, assertMultiLineEqual, assertNotAlmostEqual, assertNotAlmostEquals, assertNotEqual, assertNotEquals, assertNotIn, assertNotIsInstance, assertNotRegexpMatches, assertRaises, assertRaisesRegexp, assertRegexpMatches, assertSequenceEqual, assertSetEqual, assertTrue, assertTupleEqual, assert_, countTestCases, debug, defaultTestResult, doCleanups, fail, failIf, failIfAlmostEqual, failIfEqual, failUnless, failUnlessAlmostEqual, failUnlessEqual, failUnlessRaises, id, run, shortDescription, skipTest

Inherited from object: __delattr__, __format__, __getattribute__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __subclasshook__

Class Methods

Inherited from unittest.case.TestCase: setUpClass, tearDownClass

Class Variables

Inherited from unittest.case.TestCase: longMessage, maxDiff

Properties

Inherited from object: __class__

Method Details

setUp(self)

source code 
Hook method for setting up the test fixture before exercising it.
Overrides: unittest.case.TestCase.setUp
(inherited documentation)

tearDown(self)

source code 
Hook method for deconstructing the test fixture after testing it.
Overrides: unittest.case.TestCase.tearDown
(inherited documentation)

test_implements_multiple(self)

source code 
Verify that a component "implementing" an interface more than once (e.g. through inheritance) is not called more than once from an extension point.

test_component_manager_component_isolation(self)

source code 

Verify that a component manager that is also a component will only be listed in extension points for components instantiated in its scope.

See bh:comment:5:ticket:438 and #11121