X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/01cf080f9983313a50b902e477d7b30b03afa131..c5f67bbc40e8f6a98854b1bf67fc6a98cff80790:/sdk/cwl/tests/matcher.py diff --git a/sdk/cwl/tests/matcher.py b/sdk/cwl/tests/matcher.py index d3c93168e1..04e67b7dbd 100644 --- a/sdk/cwl/tests/matcher.py +++ b/sdk/cwl/tests/matcher.py @@ -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)