

def check(self, saved=False):
    'Does the checking, if saved is True it does not change the\n        properties at first to see how those behave and only tests the\n        final unpickled state.'
    script = self.script
    e = script.engine
    scene = e.current_scene
    src = scene.children[0]
    ud = src.children[0]
    o = ud.children[0].children[0].children[0]
    mm = o.children[0]
    if (not saved):
        assert (ud.filter.vector_mode == 'compute_gradient')
        assert (scene.get_output_dataset().point_data.scalars.name == 't')
        assert (src.get_output_dataset().point_data.vectors.name == 'uvw')
        expect = ['ScalarGradient', 'Vorticity']
        expect1 = [(x + '-y') for x in expect]
        expect2 = [(x + ' magnitude') for x in expect]
        assert (o.get_output_dataset().point_data.scalars.name in expect1)
        assert (o.get_output_dataset().point_data.vectors.name in expect)
        assert (mm.scalar_lut_manager.data_name in expect1)
        o.enabled = False
        assert (o.get_output_dataset().point_data.scalars.name in expect2)
        assert (o.get_output_dataset().point_data.vectors.name in expect)
        assert (mm.scalar_lut_manager.data_name in expect2)
        ud.filter.vector_mode = 'compute_vorticity'
    assert (o.get_output_dataset().point_data.scalars.name == 'Vorticity magnitude')
    assert (o.get_output_dataset().point_data.vectors.name == 'Vorticity')
    assert (mm.scalar_lut_manager.data_name == 'Vorticity magnitude')
    o.enabled = True
    assert (o.get_output_dataset().point_data.scalars.name == 'Vorticity-y')
    assert (o.get_output_dataset().point_data.vectors.name == 'Vorticity')
    assert (mm.scalar_lut_manager.data_name == 'Vorticity-y')
    o.enabled = False

dataset/ETHPy150Open enthought/mayavi/integrationtests/mayavi/test_user_defined.py TestUserDefined.check/VarMisuse@101/171 `src`->`scene`