]> granicus.if.org Git - graphviz/commitdiff
tests: strip 'XType' warnings in '-?' usage test
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 26 Mar 2022 19:36:30 +0000 (12:36 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Tue, 29 Mar 2022 23:44:36 +0000 (16:44 -0700)
On macOS, Smyrna prints some warnings prior to the usage text:

  2022-03-26 19:32:21.216 smyrna[70079:124370] XType: com.apple.fonts is not
    accessible.
  2022-03-26 19:32:21.216 smyrna[70079:124370] XType: XTFontStaticRegistry is
    enabled.
  Usage: smyrna [-v?] <file>

Gitlab: related to #1836, #1854

rtest/test_tools.py

index ea98b3a695d88cfbf85dc10ff3d93c94e7d1d9b3..efc402fd1d155917b7db49e441208b1ec0c93eea 100644 (file)
@@ -15,7 +15,7 @@ import sys
 import pytest
 
 sys.path.append(os.path.dirname(__file__))
-from gvtest import is_cmake #pylint: disable=C0413
+from gvtest import is_cmake, remove_xtype_warnings #pylint: disable=C0413
 
 @pytest.mark.parametrize("tool", [
     "acyclic",
@@ -106,6 +106,7 @@ def test_tools(tool):
 
   assert ret == 0, f"`{tool} -?` failed. Output was: {output}"
 
+  output = remove_xtype_warnings(output)
   assert re.match("usage", output, flags=re.IGNORECASE) is not None, \
     f"{tool} -? did not show usage. Output was: {output}"