-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
bugfix: ignore commented-out schema tests #330
Conversation
ef5e533
to
4b381fa
Compare
dbt/parser.py
Outdated
@@ -256,6 +256,9 @@ def parse_schema_tests(tests, root_project, projects): | |||
|
|||
for model_name, test_spec in test_yml.items(): | |||
for test_type, configs in test_spec.get('constraints', {}).items(): |
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.
can we also check if test_spec is None
? That would happen here:
test_model:
constraints:
# unique:
#- some_field
Edge case, but would be good to avoid the ol stack trace :)
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.
Would also be good to check that test is not None
on line 253.
test_model:
# constraints:
# unique:
# - some_field
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.
two minor comments otherwise approved!
@drewbanin I added some more edge case tests and put in the fixes. See what I did for test==None, I don't fully understand your suggestion but I think |
lgtm |
…bug/ignore-commented-schema-tests
Fix for #328