Salome HOME
some fixes in tests
[modules/paravis.git] / test / VisuPrs / MeshPresentation / K0.py
index 48e82753f2ce0fe987b34c325b28a207ac74a8bd..cc55cbc728ce5d822b2a0b204e56181c93a791cb 100644 (file)
 #
 
 #This case corresponds to: /visu/MeshPresentation/K0 case
-# Create  mesh presentation for nodes and cells of the the given MED file 
+# Create  mesh presentation for nodes and cells of the the given MED file
 
 import sys
 from paravistest import datadir, pictureext, get_picture_dir
 from presentations import *
 from pvsimple import *
-import pvserver as paravis
 
-# Create presentations
-myParavis = paravis.myParavis
 picturedir = get_picture_dir("MeshPresentation/K0")
 
 theFileName = datadir +  "LargeUnitTetra.med"
@@ -39,7 +36,7 @@ print " --------------------------------- "
 result = OpenDataFile(theFileName)
 aProxy = GetActiveSource()
 if aProxy is None:
-       raise RuntimeError, "Error: can't import file."
+        raise RuntimeError, "Error: can't import file."
 else: print "OK"
 
 aView = GetRenderView()
@@ -52,9 +49,9 @@ entity_types = [EntityType.NODE,EntityType.CELL]
 for entity_type in entity_types:
     entity_name = EntityType.get_name(entity_type)
     mesh = MeshOnEntity(aProxy, mesh_name ,entity_type)
-    if mesh is None: 
+    if mesh is None:
         msg = "ERROR!!!Presentation of mesh on '"+entity_name+"' family wasn't created..."
-        raise RuntimeError, msg 
+        raise RuntimeError, msg
     mesh.Visibility=1
     reset_view(aView)
     Render()
@@ -65,7 +62,7 @@ for entity_type in entity_types:
     entity_name = EntityType.get_name(entity_type)
     # Construct image file name
     pic_name = picturedir + mesh_name + "_" + entity_name + "." + pictureext
-    
+
     process_prs_for_test(mesh, aView, pic_name)