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

init push up of converted unique_key tests #4958

Merged
merged 18 commits into from
Apr 7, 2022
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .changes/unreleased/Features-20220328-150812.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
kind: Features
body: converting unique key as list tests to new pytest format
time: 2022-03-28T15:08:12.70006-05:00
custom:
Author: McKnight-42
Issue: "4882"
PR: "4958"
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
from pathlib import Path


TestResults = namedtuple(
'TestResults',
ResultHolder = namedtuple(
McKnight-42 marked this conversation as resolved.
Show resolved Hide resolved
'ResultHolder',
['seed_count', 'model_count', 'seed_rows', 'inc_test_model_count',
'opt_model_count', 'relation'],
)
Expand Down Expand Up @@ -88,7 +88,7 @@ def test_scenario_correctness(self, expected_fields, test_case_fields):
def stub_expected_fields(
self, relation, seed_rows, opt_model_count=None
):
return TestResults(
return ResultHolder(
seed_count=1, model_count=1, seed_rows=seed_rows,
inc_test_model_count=1, opt_model_count=opt_model_count,
relation=relation
Expand Down Expand Up @@ -126,7 +126,7 @@ def test__postgres_no_unique_keys(self):
expected_fields = self.stub_expected_fields(
relation=seed, seed_rows=seed_rows
)
test_case_fields = TestResults(
test_case_fields = ResultHolder(
*self.setup_test(seed, incremental_model, update_sql_file),
opt_model_count=None, relation=incremental_model
)
Expand All @@ -146,7 +146,7 @@ def test__postgres_empty_str_unique_key(self):
expected_fields = self.stub_expected_fields(
relation=seed, seed_rows=seed_rows
)
test_case_fields = TestResults(
test_case_fields = ResultHolder(
*self.setup_test(seed, incremental_model, update_sql_file),
opt_model_count=None, relation=incremental_model
)
Expand All @@ -165,7 +165,7 @@ def test__postgres_one_unique_key(self):
expected_fields = self.stub_expected_fields(
relation=expected_model, seed_rows=seed_rows, opt_model_count=1
)
test_case_fields = TestResults(
test_case_fields = ResultHolder(
*self.setup_test(seed, incremental_model, update_sql_file),
opt_model_count=self.update_incremental_model(expected_model),
relation=incremental_model
Expand Down Expand Up @@ -197,7 +197,7 @@ def test__postgres_empty_unique_key_list(self):
expected_fields = self.stub_expected_fields(
relation=seed, seed_rows=seed_rows
)
test_case_fields = TestResults(
test_case_fields = ResultHolder(
*self.setup_test(seed, incremental_model, update_sql_file),
opt_model_count=None, relation=incremental_model
)
Expand All @@ -216,7 +216,7 @@ def test__postgres_unary_unique_key_list(self):
expected_fields = self.stub_expected_fields(
relation=expected_model, seed_rows=seed_rows, opt_model_count=1
)
test_case_fields = TestResults(
test_case_fields = ResultHolder(
*self.setup_test(seed, incremental_model, update_sql_file),
opt_model_count=self.update_incremental_model(expected_model),
relation=incremental_model
Expand All @@ -236,7 +236,7 @@ def test__postgres_duplicated_unary_unique_key_list(self):
expected_fields = self.stub_expected_fields(
relation=expected_model, seed_rows=seed_rows, opt_model_count=1
)
test_case_fields = TestResults(
test_case_fields = ResultHolder(
*self.setup_test(seed, incremental_model, update_sql_file),
opt_model_count=self.update_incremental_model(expected_model),
relation=incremental_model
Expand All @@ -256,7 +256,7 @@ def test__postgres_trinary_unique_key_list(self):
expected_fields = self.stub_expected_fields(
relation=expected_model, seed_rows=seed_rows, opt_model_count=1
)
test_case_fields = TestResults(
test_case_fields = ResultHolder(
*self.setup_test(seed, incremental_model, update_sql_file),
opt_model_count=self.update_incremental_model(expected_model),
relation=incremental_model
Expand All @@ -276,7 +276,7 @@ def test__postgres_trinary_unique_key_list_no_update(self):
expected_fields = self.stub_expected_fields(
relation=seed, seed_rows=seed_rows
)
test_case_fields = TestResults(
test_case_fields = ResultHolder(
*self.setup_test(seed, incremental_model, update_sql_file),
opt_model_count=None, relation=incremental_model
)
Expand Down
Loading