[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Reply to: [list | sender only]
[ddlm-group] Task II: autogenerate a test for linked items
- To: ddlm-group <ddlm-group@iucr.org>
- Subject: [ddlm-group] Task II: autogenerate a test for linked items
- From: James Hester <jamesrhester@gmail.com>
- Date: Fri, 19 Oct 2018 13:13:35 +1100
- DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;h=mime-version:reply-to:from:date:message-id:subject:to;bh=9sBXRT3yMqcazavpa9DGgobab8Ve5CgonMijOJ4rxFE=;b=BDji4DylTxIvWgOZM787oxgvvMEnHv3zgZTl/lotHyip6q0xiAFaM42iEthXnUTD4jjv/nXjGlvQxZ3C83t/7ykZVWG9ft6+2wzlErwkCioOLZFQtM56UG7unSXWUz4Tb+IW2nfAeti6CdOXMtvCP3ZMc0AWoVU3+WIbAgC7Ar1FyZ8ZVzUkH5p9WRcO3WFHzGsXFVdNkOtwxCw2AjAYM39AOj8hoKGzL2MR1E5Bb6JCEgYZIxHB/1+uk0GMZJN7hIFNsa9ZZPIm48VLVSG0p2PPZrd38O3ksm2T+jq8nBgNVsT1zPi1PCe8vu4ItT1N7exLKslEE8QggaueNcz5Ew==
This email seeks an autogenerated test for checking that values of a data name that is linked, via _name.linked_item_id, to another data name, only take values taken by that data name. I have not been able to construct such a test, because I can't loop over the values of a dataname from a different category, because I cannot look up the category that a given dataname belongs to at test generation time (because I only have access to the contents of a single domain dictionary definition in the standard dREL execution environment). So this is more of a challenge: please come up with such a test, or a way to make such a test work. In the sketch of a solution below, you need to somehow either find the values of $linked_category and $linked_dataname_object at test generation time, or instead directly access those values at test execution time.
# ... previous sections
link_template = """
found = 'False'
loop q as $linked_category {
if ($dataname == q.$linked_dataname_object) found = 'True'
}
return found
"""
if (method.id == 'linked') {
--
method.expression = resolve_variables(link_template)
}
T +61 (02) 9717 9907
F +61 (02) 9717 3145
M +61 (04) 0249 4148
F +61 (02) 9717 3145
M +61 (04) 0249 4148
_______________________________________________ ddlm-group mailing list ddlm-group@iucr.org http://mailman.iucr.org/cgi-bin/mailman/listinfo/ddlm-group
Reply to: [list | sender only]
- Follow-Ups:
- Prev by Date: Re: [ddlm-group] Third and final proposal to enhance dREL
- Next by Date: Re: [ddlm-group] Refocusing discussion on dREL use for validation
- Prev by thread: Re: [ddlm-group] Clarifying semantics of _type.purpose 'Key'
- Next by thread: Re: [ddlm-group] Task II: autogenerate a test for linked items
- Index(es):