-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[23.2] Yaml nested assertions: fix parsing #17641
[23.2] Yaml nested assertions: fix parsing #17641
Conversation
were forgotten to be implemented
57aeecf
to
73ced4e
Compare
73ced4e
to
df7c2af
Compare
""" | ||
- has_archive_member: | ||
path: ".*" | ||
children: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess that's what your comment about asserts was about ? It does feel more consistent for that to be
asserts:
- has_text:
text: thing
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I used the syntax from the other examples in the file
I'm still struggling with yaml, but it seems that
yaml.load("""
asserts:
- has_text:
text: thing
"""
)
gives `{'asserts': [{'has_text': None, 'text': 'thing'}]}`
while
```python
yaml.load("""
asserts:
- has_text:
text: thing
"""
)
gives {'asserts': [{'has_text': {'text': 'thing'}}]}
. Not sure if both versions are parsed at the moment.
Not sure if the former even works.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, typing without checking, it should be
asserts:
- has_text:
text: thing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes this is what I meant with my comment at the planemo issue
Not sure, but easy to implement I guess. But I can clearly live with the current state. The only question would be if it would simplify anything if we use asserts
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, then we can re-use models and there's no question what you have to use IMO - it's always asserts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then remove children completely, or leave it as falll back? I guess since it seems that this was never used, we may just change it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Leave it as a fallback but don't document it would be my suggestion ?
This PR was merged without a "kind/" label, please correct. |
Seems that the recursive call was forgotten.
How to test the changes?
(Select all options that apply)
License