Skip to content
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

Merged
merged 4 commits into from
Mar 15, 2017

Conversation

cmcarthur
Copy link
Member

Fix for #328

@cmcarthur cmcarthur force-pushed the bug/ignore-commented-schema-tests branch from ef5e533 to 4b381fa Compare March 14, 2017 22:17
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():
Copy link
Contributor

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 :)

Copy link
Contributor

@drewbanin drewbanin Mar 14, 2017

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

@drewbanin drewbanin self-requested a review March 14, 2017 23:11
Copy link
Contributor

@drewbanin drewbanin left a 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!

@cmcarthur
Copy link
Member Author

@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 test_yml is None might cover it

@drewbanin
Copy link
Contributor

lgtm

@cmcarthur cmcarthur merged commit a817c9f into development Mar 15, 2017
@cmcarthur cmcarthur deleted the bug/ignore-commented-schema-tests branch March 15, 2017 01:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants