def test_register_interface_decl_cls1_bis(collector): """Test handling interface class issues : failed import Name error. """ tb = {} task = Task(task='ecpy.tasks.tasks.logic.loop_task:LoopTask', view='ecpy.tasks.tasks.logic.views.loop_view:LoopView') i = Interface(interface='loop_iterable_interface:IterableLoopInterface', views=['views.loop_iterable_view:IterableLoopLabel']) task.insert_children(None, [i]) i.interface = 'ecpy.testing.broken_module:Test' task.register(collector, tb) assert ('ecpy.LoopTask.Test' in tb and 'NameError' in tb['ecpy.LoopTask.Test'])
def test_register_interface_decl_view1_bis(int_decl, collector): """Test handling view issues : failed import due to NameError. """ tb = {} task = Task(task='ecpy.tasks.tasks.logic.loop_task:LoopTask', view='ecpy.tasks.tasks.logic.views.loop_view:LoopView') i = Interface( interface= 'ecpy.tasks.tasks.logic.loop_iterable_interface:IterableLoopInterface', views=['_dumy__:Test', 'ecpy.testing.broken_enaml:Task']) task.insert_children(None, [i]) task.register(collector, tb) assert ('ecpy.LoopTask.IterableLoopInterface_1' in tb and 'NameError' in tb['ecpy.LoopTask.IterableLoopInterface_1'])