X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=test%2Fdemo3.py;h=8f6305e4481605ba8e580238f960f2a5f54eaadb;hb=refs%2Fheads%2Fagr%2Ffix_tests;hp=e3e3a8357031d5386401794a291a89e2bcab9224;hpb=ee690f177c97c5f6093551b09c3cb8ac4a3020d1;p=modules%2Fparavis.git diff --git a/test/demo3.py b/test/demo3.py index e3e3a835..8f6305e4 100755 --- a/test/demo3.py +++ b/test/demo3.py @@ -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/")