]> granicus.if.org Git - graphviz/commitdiff
tests: move 'is_mingw' helper into gvtest library
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Fri, 11 Mar 2022 04:47:12 +0000 (20:47 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 19 Mar 2022 20:29:32 +0000 (13:29 -0700)
rtest/gvtest.py
rtest/test_regression.py

index 7e6bc62924d1c8028f452d71f659e9de76d3c309..8cfd74b2246443d6a72abc7b3012d8cd7a848329 100644 (file)
@@ -109,6 +109,10 @@ def gvpr(program: Path) -> str:
                                  stdin=subprocess.DEVNULL,
                                  universal_newlines=True)
 
+def is_mingw() -> bool:
+  """is the current platform MinGW?"""
+  return "mingw" in sysconfig.get_platform()
+
 def run_c(src: Path, args: List[str] = None, input: str = "",
           cflags: List[str] = None, link: List[str] = None
           ) -> Tuple[str, str]:
index 27dd231dc1e9bf621b015741421d01c7b7323faa..c80b03e35b38be9248fa46e059743f34a6301cae 100644 (file)
@@ -15,21 +15,13 @@ import signal
 import stat
 import subprocess
 import sys
-import sysconfig
 import tempfile
 from typing import List
 import xml.etree.ElementTree as ET
 import pytest
 
 sys.path.append(os.path.dirname(__file__))
-from gvtest import dot, gvpr, ROOT, run_c #pylint: disable=C0413
-
-def is_mingw() -> bool:
-  """
-  are we running on MinGW?
-  """
-
-  return "mingw" in sysconfig.get_platform()
+from gvtest import dot, gvpr, is_mingw, ROOT, run_c #pylint: disable=C0413
 
 def is_ndebug_defined() -> bool:
   """