Added sample fixture and multiline parser#19
Merged
Conversation
Collaborator
|
I'm getting an error running pytest on |
Member
Author
|
Hi @joshua-hampton, that's a good point. I actually made the second test but it does correctly fail at the moment. I'll mark it to skip for now. |
Member
Author
|
@joshua-hampton please re-pull the change and check it is now set to accept the failure for that test. |
joshua-hampton
approved these changes
Nov 14, 2022
joshua-hampton
left a comment
Collaborator
There was a problem hiding this comment.
That test now successfully fails with grace, happy to approve.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This fix includes two things:
1. Multi-line parser.
Where there are attributes (variable or global) that include arrays, then the lines end in a comma. The parser now ensures these are parsed correctly into a tuple rather than raising an exception.
A test has been added for this in:
tests/test_readers.py2. Sample fixtures - for regression testing
One danger is that new changes to the
cdl.readersclasses will modify how the content is parsed intochecksit. If that happens unintentionally then the integrity of the whole process is damaged.I have captured some example parsed content into a python
shelve, withintests/sample-fixture. This was created from the example files in:tests/sample-fixture/sample-ncs/using the script:tests/sample-fixture/make-sample-fixture.py.When we make changes to the readers, the tests in
tests/test_sample_data_matches.pywill help to ensure that the readers have not been compromised.