<s> """<STR_LIT>""" <EOL> import unittest <EOL> from mayavi . core . common import get_object_path , get_engine <EOL> from mayavi . sources . parametric_surface import ParametricSurface <EOL> from mayavi . modules . outline import Outline <EOL> from mayavi . core . null_engine import NullEngine <EOL> class TestCoreCommon ( unittest . TestCase ) : <EOL> def setUp ( self ) : <EOL> e = NullEngine ( ) <EOL> e . start ( ) <EOL> e . new_scene ( ) <EOL> scene = e . scenes [ - <NUM_LIT:1> ] <EOL> s = ParametricSurface ( ) <EOL> e . add_source ( s ) <EOL> o = Outline ( ) <EOL> s . add_child ( o ) <EOL> o1 = Outline ( ) <EOL> s . add_child ( o1 ) <EOL> self . scene = scene <EOL> self . e = e <EOL> self . s = s <EOL> self . o = o <EOL> self . o1 = o1 <EOL> return <EOL> def test_get_object_path ( self ) : <EOL> "<STR_LIT>" <EOL> e , scene , s , o , o1 = self . e , self . scene , self . s , self . o , self . o1 <EOL> value = get_object_path ( scene , e ) <EOL> self . assertEqual ( value , '<STR_LIT>' ) <EOL> value = get_object_path ( s , e ) <EOL> self . assertEqual ( value , '<STR_LIT>' ) <EOL> value = get_object_path ( o . module_manager , e ) <EOL> self . assertEqual ( value , <EOL> '<STR_LIT>' ) <EOL> value = get_object_path ( o , e ) <EOL> self . assertEqual ( value , <EOL> '<STR_LIT>' ) <EOL> value = get_object_path ( o1 , e ) <EOL> self . assertEqual ( value , <EOL> '<STR_LIT>' ) <EOL> value = get_object_path ( o , scene , '<STR_LIT>' ) <EOL> self . assertEqual ( value , <EOL> '<STR_LIT>' ) <EOL> value = get_object_path ( o , s , '<STR_LIT:s>' ) <EOL> self . assertEqual ( value , '<STR_LIT>' ) <EOL> value = get_object_path ( o1 , s , '<STR_LIT:s>' ) <EOL> self . assertEqual ( value , '<STR_LIT>' ) <EOL> def test_get_engine ( self ) : <EOL> e , scene , s , o , o1 = self . e , self . scene , self . s , self . o , self . o1 <EOL> self . assertEqual ( e , get_engine ( scene ) ) <EOL> self . assertEqual ( e , get_engine ( s ) ) <EOL> self . assertEqual ( e , get_engine ( o ) ) <EOL> self . assertEqual ( e , get_engine ( o1 ) ) <EOL> self . assertEqual ( e , get_engine ( o . module_manager ) ) <EOL> self . assertEqual ( e , get_engine ( o1 . module_manager ) ) <EOL> def test_remove ( self ) : <EOL> "<STR_LIT>" <EOL> self . e . current_object = self . o1 <EOL> mm = self . o1 . module_manager <EOL> self . o1 . remove ( ) <EOL> o1 = Outline ( ) <EOL> self . e . add_module ( o1 ) <EOL> self . assertEqual ( o1 . module_manager , mm ) <EOL> self . assertEqual ( o1 . parent , mm ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> unittest . main ( ) </s>
