Skip to content
Snippets Groups Projects
Verified Commit 22b53f7a authored by Daniel Hornung's avatar Daniel Hornung
Browse files

STY, DOC: A few small changes to documentation and regression test.

parent 9f926381
No related branches found
No related tags found
2 merge requests!217TST: Make NamedTemporaryFiles Windows-compatible,!216TST: Make NamedTemporaryFiles Windows-compatible
Pipeline #60650 passed
......@@ -1295,17 +1295,17 @@ class YAMLFileConverter(SimpleFileConverter):
def match_name_and_value(definition, name, value):
"""Take match definitions from the definition argument and apply regular expression to name and
possibly value
possibly value.
one of the keys 'match_name' and "match' needs to be available in definition
'match_value' is optional
Exactly one of the keys ``match_name`` and ``match`` must exist in ``definition``,
``match_value`` is optional
Returns
-------
out:
None, if match_name or match lead to no match. Otherwise, returns a dictionary with the
matched groups, possibly including matches from using match_value
matched groups, possibly including matches from using `definition["match_value"]`
"""
if "match_name" in definition:
......
......@@ -218,8 +218,8 @@ def test_issue_112(converter_registry):
if rec.name == "event_a":
assert rec.get_property("event_time") is not None
assert rec.get_property("event_time").value == "2025-02-06"
elif rec.name == "event_b":
# This should not have matched
if rec.name == "event_b":
# `date` field is empty, so there must be no match
assert rec.get_property("event_time") is None
if rec.name == "event_c":
assert rec.get_property("event_time") is not None
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment