X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/01cf080f9983313a50b902e477d7b30b03afa131..0d50e82dd2255104e60c0882045b54774e1be380:/sdk/cwl/tests/matcher.py diff --git a/sdk/cwl/tests/matcher.py b/sdk/cwl/tests/matcher.py index d3c93168e1..50c0c60b1d 100644 --- a/sdk/cwl/tests/matcher.py +++ b/sdk/cwl/tests/matcher.py @@ -1,5 +1,10 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: Apache-2.0 + import difflib import json +import re class JsonDiffMatcher(object): @@ -21,3 +26,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)