Salome HOME
[bos #32518][EDF] (2022-T3)
[tools/libbatch.git] / src / Python / Test / config.py.in
index 023b7ccbc434701b34105c46fd4c99fd5303ddad..5b2ff227f8fae6e243437fc51709c32f528b25b4 100644 (file)
@@ -25,5 +25,7 @@ import os
 sys.path.append('${CMAKE_CURRENT_BINARY_DIR}/..')
 
 configfile = os.environ["${LIBBATCH_TEST_CONF_ENV_VAR}"]
-execfile(configfile)
+with open(configfile, "rb") as source_file:
+    code = compile(source_file.read(), configfile, "exec")
+exec(code)
 TEST_SOURCE_DIR = "${CMAKE_SOURCE_DIR}/src/Core/Test"