18870: Need to declare NODES as array
[arvados.git] / sdk / cwl / tests / matcher.py
index d3c93168e188cd345fde2117a741c803e0b00b13..04e67b7dbd48aaefec075e77c2a8836d81cb2631 100644 (file)
@@ -1,5 +1,12 @@
+# Copyright (C) The Arvados Authors. All rights reserved.
+#
+# SPDX-License-Identifier: Apache-2.0
+
+from builtins import object
+
 import difflib
 import json
+import re
 
 
 class JsonDiffMatcher(object):
@@ -21,3 +28,7 @@ class JsonDiffMatcher(object):
                 actual_json.splitlines(1),
                 fromfile="Expected", tofile="Actual")))
         return True
+
+
+def StripYAMLComments(yml):
+    return re.sub(r'(?ms)^(#.*?\n)*\n*', '', yml)