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

add a simple set of graph unit tests for models only #270

Merged
merged 12 commits into from
Feb 7, 2017

Conversation

cmcarthur
Copy link
Member

@cmcarthur cmcarthur commented Jan 26, 2017

Adds two very simple tests -- one that just compiles a model like select * from table, and one that tests a very simple reference. It took me a little while to get started on this. I'll add more tests shortly.

Related: #230

# are EXPECTED
posix_filepath = '/'.join(split_path(model.rel_filepath))
template = jinja.get_template(posix_filepath)
template_contents = dbt.clients.system.load_file_contents(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

analysis_dirs,
"[!.#~]*.sql")

return self.build_models_from_file_matches(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is so good

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think we can clean it up even more if we drop the extreme OOP-iness in models.py but this works for now

@drewbanin drewbanin merged commit c1f3f0f into development Feb 7, 2017
@drewbanin drewbanin deleted the graph-unit-tests branch February 7, 2017 05:55
yu-iskw pushed a commit to yu-iskw/dbt that referenced this pull request Aug 17, 2021
Added quote_columns=(true | false) flag to the unique_combination_of_columns.sql macro
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