Skip to content

Commit

Permalink
format fixtures.py
Browse files Browse the repository at this point in the history
  • Loading branch information
gshank committed Jan 13, 2023
1 parent 67269a5 commit 7e13221
Showing 1 changed file with 27 additions and 41 deletions.
68 changes: 27 additions & 41 deletions tests/functional/partial_parsing/fixtures.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
import pytest
from dbt.tests.fixtures.project import write_project_files


local_dependency__dbt_project_yml = """
Expand Down Expand Up @@ -124,15 +121,15 @@
model_three_disabled2_sql = """
- Disabled model
{{ config(materialized='table', enabled=False) }}
with source_data as (
select 1 as id
union all
select null as id
)
select *
from source_data
Expand Down Expand Up @@ -380,7 +377,7 @@
tags:
- okrs
"""

Expand Down Expand Up @@ -547,18 +544,18 @@
]
%}
{% if not execute %}
{% set metric_names = [] %}
{% for m in metric_list %}
{% do metric_names.append(m.metric_name) %}
{% endfor %}
{% if not execute %}
{% set metric_names = [] %}
{% for m in metric_list %}
{% do metric_names.append(m.metric_name) %}
{% endfor %}
-- this config does nothing, but it lets us check these values
{{ config(metric_names = metric_names) }}
{{ config(metric_names = metric_names) }}
{% endif %}
select 1 as fun
Expand Down Expand Up @@ -654,15 +651,15 @@

model_three_disabled_sql = """
{{ config(materialized='table', enabled=False) }}
with source_data as (
select 1 as id
union all
select null as id
)
select *
from source_data
Expand Down Expand Up @@ -741,17 +738,17 @@

model_three_modified_sql = """
{{ config(materialized='table') }}
with source_data as (
{#- This is model three #}
select 1 as id
union all
select null as id
)
select *
from source_data
Expand Down Expand Up @@ -860,15 +857,15 @@

model_three_sql = """
{{ config(materialized='table') }}
with source_data as (
select 1 as id
union all
select null as id
)
select *
from source_data
Expand Down Expand Up @@ -1128,14 +1125,3 @@
"""

@pytest.fixture(scope="class")
def local_dependency():
return {"dbt_project.yml": local_dependency__dbt_project_yml, "models": {"schema.yml": local_dependency__models__schema_yml, "model_to_import.sql": local_dependency__models__model_to_import_sql}, "macros": {"dep_macro.sql": local_dependency__macros__dep_macro_sql}, "seeds": {"seed.csv": local_dependency__seeds__seed_csv}}

@pytest.fixture(scope="class")
def project_files(project_root, local_dependency, test_files,):
write_project_files(project_root, "local_dependency", local_dependency)
write_project_files(project_root, "test-files", test_files)


0 comments on commit 7e13221

Please sign in to comment.