Inherits from
- BasicTestMappingProtocol: enthought.contexts.tests.mapping_test_case.BasicTestMappingProtocol
Method summary
- context_factory(self, *args, **kw)
- failUnlessEqual(self, first, second, msg = None)
- key_name(self)
- matched_input_output_pair(self)
- run(self, result = None)
- test_del_existing_item(self)
- test_del_non_existing_item_raises_exception(self)
- test_eval_with_bad_name_raises_nameerror(self)
- test_get_set_like_dict(self)
- test_has_key_false(self)
- test_has_key_true(self)
- test_iter_len(self)
- test_keys(self)
- test_set_rebind(self)
- test_simple_eval_works(self)
- type2test(self, *args, **kw)
- unmatched_pair(self)
Inherited from base classes
- __init__(self, *args, **kw)
- test_bool(self)
- test_constructor(self)
- test_get(self)
- test_getitem(self)
- test_items(self)
- test_len(self)
- test_pop(self)
- test_popitem(self)
- test_read(self)
- test_setdefault(self)
- test_update(self)
- test_values(self)
- test_write(self)
Methods
- context_factory(self, *args, **kw)
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.
- failUnlessEqual(self, first, second, msg = None)
Fail if the two objects are unequal as determined by the '==' operator.
We've overloaded this here to handle arrays.
- key_name(self)
Return name of variables
- matched_input_output_pair(self)
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.
- run(self, result = None)
- test_del_existing_item(self)
Can we delete an item from the dictionary?
- test_del_non_existing_item_raises_exception(self)
Does deleting a non-existent item raise a NameError excetion?
- test_eval_with_bad_name_raises_nameerror(self)
If a name is missing in the eval statement, is NameError raised?
- test_get_set_like_dict(self)
Can you read and write values reliably?
- test_has_key_false(self)
Does has_key respond correctly when it doesn't have a key?
- test_has_key_true(self)
Does has_key respond correctly when it has a key?
- test_iter_len(self)
Can you take a len of a context?
- test_keys(self)
Does has_key respond correctly when it doesn't have a key?
- test_set_rebind(self)
Does rebinding a variable work?
- test_simple_eval_works(self)
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.
- type2test(self, *args, **kw)
Return a context to be tested by BasicTestMappingProtocol.
- unmatched_pair(self)
Return a pair of values that are different.