X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2Fpmml%2Fpmml_swig%2FPMMLBasicsTest.py;h=cede6506b65024b447871f03b3189c29ae1e8ac6;hb=1894c52d0838df8676e770bef061fc23ca436452;hp=38a0945f98b52d026b7987172fd0722630878aed;hpb=ebc32b24303c7f20537c707c77d23e7daa8a20db;p=modules%2Fyacs.git diff --git a/src/pmml/pmml_swig/PMMLBasicsTest.py b/src/pmml/pmml_swig/PMMLBasicsTest.py index 38a0945f9..cede6506b 100644 --- a/src/pmml/pmml_swig/PMMLBasicsTest.py +++ b/src/pmml/pmml_swig/PMMLBasicsTest.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- -# Copyright (C) 2007-2022 CEA/DEN, EDF R&D +# Copyright (C) 2007-2024 CEA, EDF # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -27,21 +27,13 @@ import unittest import os import shutil import platform +import tempfile class PMMLBasicsTest(unittest.TestCase): def setUp(self): self.resourcesDir = ".." + os.sep + "Test" + os.sep + "samples" + os.sep ; - if platform.system() == "Windows" : - self.tmpDir = os.environ['TMP'] # %TMP% does exist on WINDOWS - else: - self.tmpDir = os.sep + "tmp" + os.sep + os.environ['LOGNAME'] + os.sep ; - self.tmpDir += "PmmlUnitTest"; - self.tmpDir += os.sep ; - if ( not os.path.exists(self.tmpDir) ): - os.makedirs(self.tmpDir); - pass - pass + self.tmpDir = tempfile.mkdtemp(suffix="PmmlUnitTest") def tearDown(self): if ( os.path.exists(self.tmpDir) ):