Skip to content

Using dbt pytest fixtures for plugins #5624

Answered by jtcohen6
max-sixty asked this question in Q&A
Discussion options

You must be logged in to vote

Is it possible to use dbt pytest fixtures in plugins?

Yes! In plugins, in packages — really, wherever you can install and run dbt-core + pytest.

Existing documentation: https://docs.getdbt.com/docs/contributing/testing-a-new-adapter. Note that you don't actually need to be testing an adapter to use this.

There's a discussion about this, which will hopefully turn into a developer blog post / guide: dbt-labs/docs.getdbt.com#1808

Any other thoughts or suggestions for testing the output of dbt compile?

Hmm. Appreciate the added overhead required by having a live DB connection. The time overhead does go down significantly if you're using a local or in-memory database (Postgres, DuckDB, SQL…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@max-sixty
Comment options

@jtcohen6
Comment options

Answer selected by max-sixty
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants