2411: Fix tests to accommodate copyright notices.
[arvados.git] / sdk / cwl / tests / matcher.py
index d3c93168e188cd345fde2117a741c803e0b00b13..892586247cc8441fe90350459aef411ba6fca80f 100644 (file)
@@ -1,5 +1,6 @@
 import difflib
 import json
+import re
 
 
 class JsonDiffMatcher(object):
@@ -21,3 +22,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)