Salome HOME
style: black format
[tools/sat.git] / test / initializeTest.py
index 14a3ff7d1a2698d60572341e9ffe5ba7323d450c..a54f6ddcf322bf431ae8463f9f8241b186ee2164 100755 (executable)
@@ -1,5 +1,5 @@
 #!/usr/bin/env python
-#-*- coding:utf-8 -*-
+# -*- coding:utf-8 -*-
 
 #  Copyright (C) 2010-2018  CEA/DEN
 #
@@ -43,19 +43,23 @@ satdir = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
 # sys.stderr.write("INFO    : initializeTest needs '%s' in sys.path:\n%s\n" % (satdir, PP.pformat(sys.path)))
 
 if satdir not in sys.path:
-  # get path to salomeTools sources FIRST as prepend
-  # Make the src & commands package accessible from all test code
-  sys.path.insert(0, satdir)
-  sys.stderr.write("""\
+    # get path to salomeTools sources FIRST as prepend
+    # Make the src & commands package accessible from all test code
+    sys.path.insert(0, satdir)
+    sys.stderr.write(
+        """\
 WARNING : sys.path not set for salomeTools, fixed for you:
           sys.path prepend '%s'
-          sys.path:\n%s\n""" % (satdir, PP.pformat(sys.path)))
-  # os.environ PATH is not set...
-  # supposedly useful only for subprocess launch from sat
-  # see https://docs.python.org/2/library/os.html
-  # On some platforms, including FreeBSD and Mac OS X, 
-  # setting environ may cause memory leaks.
-  # sys.stderr.write("os.environ PATH:\n%s\n" % PP.pformat(os.environ["PATH"].split(":")))
-  sys.stderr.write("INFO    : to fix this message type:\n  'export PYTHONPATH=%s:${PYTHONPATH}'\n" % satdir)
-  
-
+          sys.path:\n%s\n"""
+        % (satdir, PP.pformat(sys.path))
+    )
+    # os.environ PATH is not set...
+    # supposedly useful only for subprocess launch from sat
+    # see https://docs.python.org/2/library/os.html
+    # On some platforms, including FreeBSD and Mac OS X,
+    # setting environ may cause memory leaks.
+    # sys.stderr.write("os.environ PATH:\n%s\n" % PP.pformat(os.environ["PATH"].split(":")))
+    sys.stderr.write(
+        "INFO    : to fix this message type:\n  'export PYTHONPATH=%s:${PYTHONPATH}'\n"
+        % satdir
+    )