Salome HOME
Fix EDF tests
[modules/paravis.git] / test / demo3.py
index e3e3a8357031d5386401794a291a89e2bcab9224..8f6305e4481605ba8e580238f960f2a5f54eaadb 100755 (executable)
@@ -1,4 +1,4 @@
-# Copyright (C) 2010-2014  CEA/DEN, EDF R&D
+# Copyright (C) 2010-2016  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
@@ -21,7 +21,7 @@
 if not ('servermanager' in dir()):
   from pvsimple import *
 
-import  os
+import  os, inspect
 
 def demo3(impth):
     """This method demonstrates an artificial data sources,
@@ -90,8 +90,10 @@ def demo3(impth):
     WriteImage(filename = (impth + "demo3_1.png"), view=v, Magnification=2)
     WriteImage(filename = (impth + "demo3_2.png"), view=rv, Magnification=2)
 
-testdir = os.getenv("TESTDIR")
-pvdata = os.getenv("PVDATA")
+
+scriptdir = inspect.getframeinfo(inspect.currentframe())[0]
+testdir = os.path.dirname( os.path.abspath(scriptdir) )
+
 
 if __name__ == "__main__":
- demo3(impth=testdir+"/Pic/")
   demo3(impth=testdir+"/Pic/")