Skip to content

Commit

Permalink
Remove tmp file after test passed (#5749)
Browse files Browse the repository at this point in the history
* Remove tmp file after test passed

* Add changelog entry
  • Loading branch information
bbroeksema committed Sep 9, 2022
1 parent 10b2a7e commit e3f8275
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
7 changes: 7 additions & 0 deletions .changes/unreleased/Fixes-20220909-092832.yaml
@@ -0,0 +1,7 @@
kind: Fixes
body: Remove temp files generated by unit tests
time: 2022-09-09T09:28:32.590208+02:00
custom:
Author: bbroeksema
Issue: "5631"
PR: "5749"
7 changes: 5 additions & 2 deletions tests/functional/simple_seed/test_seed.py
Expand Up @@ -6,6 +6,7 @@
from pathlib import Path

from dbt.tests.util import (
rm_file,
run_dbt,
read_file,
check_relations_equal,
Expand Down Expand Up @@ -266,13 +267,15 @@ def _make_big_seed(self, test_data_dir):
def seeds(self, test_data_dir):
seed_unicode = read_file(test_data_dir, "seed_unicode.csv")
dotted_seed = read_file(test_data_dir, "seed.with.dots.csv")
big_seed = read_file(self._make_big_seed(test_data_dir))
big_seed_path = self._make_big_seed(test_data_dir)
big_seed = read_file(big_seed_path)

return {
yield {
"big_seed.csv": big_seed,
"seed.with.dots.csv": dotted_seed,
"seed_unicode.csv": seed_unicode,
}
rm_file(big_seed_path)

def test_simple_seed(self, project):
results = run_dbt(["seed"])
Expand Down

0 comments on commit e3f8275

Please sign in to comment.