Salome HOME
Update C++ code consecutive to API modification of ReadField
[tools/medcoupling.git] / src / RENUMBER / testRenumbering.py
index ab5c0c77073dfebdb39ddae65ff7bad794539b9c..ca09ecb8ffd50151d3239cff42b0eae0a1430713 100755 (executable)
@@ -1,11 +1,11 @@
 #!/usr/bin/env python
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2013  CEA/DEN, EDF R&D
+# Copyright (C) 2007-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
 # 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
@@ -189,21 +189,9 @@ class RenumberingTest(unittest.TestCase):
         pass
 
     def setUp(self):
-        srcdir   = os.getenv("srcdir")
-        med_root = os.getenv("MED_ROOT_DIR")
-        if srcdir:
-            # make test is being performed
-            self.dir_renumber="./renumber"
-            self.dir_mesh = os.path.join( srcdir, "../../resources")
-        elif med_root:
-            # hope renumber has been already installed
-            self.dir_renumber=os.path.join( med_root, "bin/salome/renumber")
-            self.dir_mesh = os.path.join( med_root, "share/salome/resources/med")
-        else:
-            # initial version
-            self.dir_renumber="../../../MED_INSTALL/bin/salome/renumber"
-            self.dir_mesh="../../resources"
-            pass
+        med_root_dir=os.getenv("MEDCOUPLING_ROOT_DIR")
+        self.dir_renumber=os.path.join(med_root_dir, "bin/renumber")
+        self.dir_mesh=os.path.join(med_root_dir, "share","resources","med")
         pass
     pass