class AbstractContextTestCase(BasicTestMappingProtocol): (source)
Known subclasses: codetools.contexts.tests.data_context_test_case.DataContextTestCase
, codetools.contexts.tests.multi_context_test_case.MultiContextTestCase
Defines the set of tests to run on any GeoContext or Adapter. NOTE: This does not derive from test case so that it doesn't get picked up and run by the unittest harness. You must mixin unittest.TestCase in your derived class.
Method | context |
Return a context-type for this test class. |
Method | fail |
Fail if the two objects are unequal as determined by the '==' operator. |
Method | key |
Return name of variables |
Method | matched |
Return a pair of values that are matched to |
Method | run |
Undocumented |
Method | test |
Can we delete an item from the dictionary? |
Method | test |
Does deleting a non-existent item raise a NameError excetion? |
Method | test |
If a name is missing in the eval statement, is NameError raised? |
Method | test |
Can you read and write values reliably? |
Method | test |
Does has_key respond correctly when it doesn't have a key? |
Method | test |
Does has_key respond correctly when it has a key? |
Method | test |
Can you take a len of a context? |
Method | test |
Does has_key respond correctly when it doesn't have a key? |
Method | test |
Does rebinding a variable work? |
Method | test |
Does the context work as an evaluation context Python's eval()? |
Method | type2test |
Return a context to be tested by BasicTestMappingProtocol. |
Method | unmatched |
Return a pair of values that are different. |
Method | _del |
Can we delete an item from the dictionary? |
Method | _del |
Does deleting a non-existent item raise a KeyError excetion? |
Method | _eval |
If a name is missing in the eval statement, is NameError raised? |
Method | _get |
Can you read and write values reliably? |
Method | _simple |
A Context should work as an evaluation context Python's eval() |
Inherited from BasicTestMappingProtocol
:
Method | __init__ |
Undocumented |
Method | test |
Undocumented |
Method | test |
Undocumented |
Method | test |
Undocumented |
Method | test |
Undocumented |
Method | test |
Undocumented |
Method | test |
Undocumented |
Method | test |
Undocumented |
Method | test |
Undocumented |
Method | test |
Undocumented |
Method | test |
Undocumented |
Method | test |
Undocumented |
Method | test |
Undocumented |
Method | test |
Undocumented |
Instance Variable | inmapping |
Undocumented |
Instance Variable | other |
Undocumented |
Instance Variable | reference |
Undocumented |
Method | _empty |
Return an empty mapping object |
Method | _full |
Return a mapping object with the value contained in data dictionary |
Method | _reference |
Return a dictionary of values which are invariant by storage in the object under test. |
codetools.contexts.tests.data_context_test_case.DataContextTestCase
, codetools.contexts.tests.multi_context_test_case.MultiContextTestCase
Return a context-type for this test class. Something like "return GeoContext()" is typical. If you are testing and adapter, then that might be likely as well.
Fail if the two objects are unequal as determined by the '==' operator. We've overloaded this here to handle arrays.
codetools.contexts.tests.context_with_unit_conversion_adapter_test_case.ContextWithUnitConversionAdapterLogTestCase
Return name of variables
codetools.contexts.tests.data_context_test_case.DataContextTestCase
, codetools.contexts.tests.multi_context_test_case.MultiContextTestCase
Return a pair of values that are matched to something like "return GeoContext()" is typical. If you are testing and adapter, then that might be likely as well.
Does the context work as an evaluation context Python's eval()? Note: depending how your adpaters work, this will likely need to be over-ridden.
codetools.contexts.tests.context_with_unit_conversion_adapter_test_case.ContextWithUnitConversionAdapterLogTestCase
Return a pair of values that are different.
codetools.contexts.tests.context_with_unit_conversion_adapter_test_case.ContextWithUnitConversionAdapterLogTestCase
A Context should work as an evaluation context Python's eval() Note: depending how your adapters work, this will likely need to be over-ridden.