Ticket #48867: mayaviPR-247.diff

File mayaviPR-247.diff, 3.8 KB (added by jjstickel (Jonathan Stickel), 9 years ago)
  • mayavi/tests/test_glyph.py

    diff --git a/mayavi/tests/test_glyph.py b/mayavi/tests/test_glyph.py
    index 5f15cea..50e5177 100644
    a b def test_glyph(self): 
    140140    def test_mask_input_points_with_random_mode(self):
    141141        """Test if masking input points works with random mode.
    142142           Tests Issue #165"""
    143         s = self.scene
    144         src = s.children[0]
    145         g = src.children[0].children[1]
    146         g.glyph.mask_input_points = True
    147143        self.check(mask=True, mask_random_mode=True)
    148144
    149145    def test_mask_input_points_without_random_mode(self):
  • tvtk/common.py

    diff --git a/tvtk/common.py b/tvtk/common.py
    index 0c82372..fb04270 100644
    a b def get_tvtk_name(vtk_name): 
    4747def is_old_pipeline():
    4848    return vtk_major_version < 6
    4949
    50 def is_version_62():
    51     return vtk_major_version == 6 and vtk_minor_version == 2
     50def is_version_62_or_later():
     51    return vtk_major_version == 6 and vtk_minor_version > 1
    5252
    5353def is_version_58():
    5454    return vtk_major_version == 5 and vtk_minor_version == 8
  • tvtk/tests/test_vtk_parser.py

    diff --git a/tvtk/tests/test_vtk_parser.py b/tvtk/tests/test_vtk_parser.py
    index 28a8c4d..27537dd 100644
    a b def test_parse(self): 
    9494               'DiffuseColor': ((1.0, 1.0, 1.0), None),
    9595               'EdgeColor': ((1.0, 1.0, 1.0), None),
    9696               'LineStipplePattern': (65535, None),
    97                'LineStippleRepeatFactor': (1, (1, vtk.VTK_LARGE_INTEGER)),
    98                'LineWidth': (1.0, (0.0, vtk.VTK_LARGE_FLOAT)),
     97               'LineStippleRepeatFactor': (1, (1, vtk.VTK_INT_MAX)),
     98               'LineWidth': (1.0, (0.0, vtk.VTK_FLOAT_MAX)),
    9999               'Opacity': (1.0, (0.0, 1.0)),
    100                'PointSize': (1.0, (0.0, vtk.VTK_LARGE_FLOAT)),
     100               'PointSize': (1.0, (0.0, vtk.VTK_FLOAT_MAX)),
    101101               'ReferenceCount': (1, None),
    102102               'Specular': (0.0, (0.0, 1.0)),
    103103               'SpecularColor': ((1.0, 1.0, 1.0), None),
    def test_parse(self): 
    140140                res = ['AddShaderVariable', 'BackfaceRender', 'DeepCopy',
    141141                       'ReleaseGraphicsResources', 'RemoveAllTextures',
    142142                       'RemoveTexture', 'Render']
    143                 if vtk_minor_version == 2:
     143                if vtk_minor_version > 1:
    144144                    res.append('VTKTextureUnit')
    145145            else:
    146146                res = ['AddShaderVariable', 'BackfaceRender', 'DeepCopy',
  • tvtk/vtk_parser.py

    diff --git a/tvtk/vtk_parser.py b/tvtk/vtk_parser.py
    index 0ffec78..8800f07 100644
    a b  
    1212# Local imports (these are relative imports for a good reason).
    1313import class_tree
    1414import vtk_module as vtk
    15 from common import is_version_62
     15from common import is_version_62_or_later
    1616
    1717class VTKMethodParser:
    1818    """This class provides useful methods for parsing methods of a VTK
    def get_method_signature(self, method): 
    301301
    302302        """
    303303        # VTK 6.2 false built in funcs/methods are ignored
    304         if is_version_62():
     304        if is_version_62_or_later():
    305305            built_in_func = isinstance(method, types.BuiltinFunctionType)
    306306            built_in_meth = isinstance(method, types.BuiltinMethodType)
    307307            if not (built_in_func or built_in_meth):
  • tvtk/wrapper_gen.py

    diff --git a/tvtk/wrapper_gen.py b/tvtk/wrapper_gen.py
    index 277ed1d..3506135 100644
    a b  
    1616
    1717# Local imports (these are relative imports because the package is not
    1818# installed when these modules are imported).
    19 from common import get_tvtk_name, camel2enthought, is_version_62, is_version_58
     19from common import get_tvtk_name, camel2enthought, is_version_58
    2020import vtk_parser
    2121import indenter
    2222import special_gen