X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/a95f899d7ac84f29b3d019aa410d265bb40833e5..bb506312949465d4503d7f0b4434cfcd435cda0a:/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)