Fix formatting issues
This commit is contained in:
Родитель
a8edc5fff4
Коммит
eabba390af
|
@ -93,7 +93,7 @@ def accumulate_dependencies(deps, raw_udfs, udf_name):
|
|||
|
||||
|
||||
def udf_usages_in_file(filepath):
|
||||
"""Returns a list of UDF names used in the provided SQL file."""
|
||||
"""Return a list of UDF names used in the provided SQL file."""
|
||||
with open(filepath) as f:
|
||||
text = f.read()
|
||||
sql = sqlparse.format(text, strip_comments=True)
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
import pytest
|
||||
"""PyTest configuration."""
|
||||
|
||||
|
||||
def pytest_configure():
|
||||
"""Generate SQL files before running tests."""
|
||||
exec(open("script/generate_sql").read())
|
||||
|
|
|
@ -1,14 +1,15 @@
|
|||
import os, sys
|
||||
import os
|
||||
import sys
|
||||
|
||||
from google.api_core.exceptions import BadRequest
|
||||
from google.cloud import bigquery
|
||||
import pytest
|
||||
|
||||
# sys.path needs to be modified to enable package imports from parent
|
||||
# and sibling directories. Also see:
|
||||
# https://stackoverflow.com/questions/6323860/sibling-package-imports/23542795#23542795
|
||||
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
||||
from bigquery_etl import parse_udf
|
||||
|
||||
from google.api_core.exceptions import BadRequest
|
||||
from google.cloud import bigquery
|
||||
import pytest
|
||||
from bigquery_etl import parse_udf # noqa: E402
|
||||
|
||||
|
||||
TEST_UDFS = """
|
||||
|
|
Загрузка…
Ссылка в новой задаче