Salome HOME
Revert one change: set empty color array name and 'None' entity.
[modules/paravis.git] / test / VisuPrs / bugs / C7.py
index 4e2feead93b22dd13da07a3ff587cfce785f70c2..b0b9f786891c585edaaaf7804cc204072e60a1b2 100644 (file)
@@ -1,9 +1,9 @@
-# Copyright (C) 2010-2013  CEA/DEN, EDF R&D
+# Copyright (C) 2010-2015  CEA/DEN, EDF R&D
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
 # License as published by the Free Software Foundation; either
-# version 2.1 of the License.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -23,18 +23,15 @@ import os
 import sys
 from paravistest import datadir, pictureext, get_picture_dir
 from presentations import *
-import paravis
 import pvsimple
 
-my_paravis = paravis.myParavis
-os.environ["PARAVIS_TEST_PICS"] = sys.argv[1]
 picturedir = get_picture_dir("bugs/C7")
 
 # 1. Import MED file
 med_file_path = datadir + "Bug583-Quadratique.resu.med"
 
 print 'Importing "Bug583-Quadratique.resu.med"....',
-my_paravis.ImportFile(med_file_path)
+pvsimple.OpenDataFile(med_file_path)
 med_reader = pvsimple.GetActiveSource()
 
 if med_reader is None:
@@ -55,7 +52,7 @@ for field in field_names:
     print "Creation of the GaussPoints presentation.. Field: ", field, "; Iteration: 1"
     presentation = GaussPointsOnField1(med_reader, EntityType.CELL, field, 1)
     if presentation is None:
-       print "ERROR!!! GaussPoints presentation wasn't created for the ", field, " field!!!"
+        print "ERROR!!! GaussPoints presentation wasn't created for the ", field, " field!!!"
         error += 1
     else:
         pic_path = os.path.join(picturedir, "GaussPoints_" + mesh_name + "_" + field + "." + pictureext)