Skip to content

Commit

Permalink
[#4128] Use platform agnostic way to check for tests/generic directory (
Browse files Browse the repository at this point in the history
  • Loading branch information
gshank authored Oct 25, 2021
1 parent f9bdfa0 commit c019a94
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions core/dbt/parser/read_files.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import pathlib
from dbt.clients.system import load_file_contents
from dbt.contracts.files import (
FilePath, ParseFileType, SourceFile, FileHash, AnySourceFile, SchemaSourceFile
Expand Down Expand Up @@ -95,10 +96,11 @@ def get_source_files(project, paths, extension, parse_file_type, saved_files):
fb_list.append(load_seed_source_file(fp, project.project_name))
# singular tests live in /tests but only generic tests live
# in /tests/generic so we want to skip those
elif (parse_file_type == ParseFileType.SingularTest and
'generic/' in fp.relative_path):
continue
else:
if parse_file_type == ParseFileType.SingularTest:
path = pathlib.Path(fp.relative_path)
if path.parts[0] == 'generic':
continue
file = load_source_file(fp, parse_file_type, project.project_name, saved_files)
# only append the list if it has contents. added to fix #3568
if file:
Expand Down

0 comments on commit c019a94

Please sign in to comment.