-
Notifications
You must be signed in to change notification settings - Fork 30
Validation Updates #363
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
Validation Updates #363
Conversation
If marked as mandatory in format, throw error.
Covered by import from formats list.
test/test_validation.py
Outdated
| validate(prop) | ||
|
|
||
| for err in validate(prop).errors: | ||
| assert("error" not in err.rank) |
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.
Some tests with invalid objects that check if the correct errors are produced should also be added.
More useful would be to test the new functionality. This PR introduces validation on object creation, so the new functionality should be tested: Are the appropriate error messages printed when an object with issues is created? Since we just print the errors to stdout when this happens and the errors aren't stored anywhere after that, it might be necessary to capture stdout in the tests and check if the expected output was printed.
|
Checks for Code Quality:
|
mpsonntag
left a comment
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.
Looks good, thanks! One additional small change and one comment (WARNING->ERROR) has not been resolved yet.
|
Checks for Code Quality:
|
|
Approved from me, though I'd like to see a few more tests for the validation. Will open an issue as follow-up to this. |
This PR