Skip to content

Commit 33beb84

Browse files
committed
fix samples tests
1 parent 775129a commit 33beb84

File tree

2 files changed

+34
-34
lines changed

2 files changed

+34
-34
lines changed

packages/google-cloud-bigquery-storage/noxfile.py

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -341,26 +341,26 @@ def system(session):
341341
for name in samples_tests:
342342
_run_samples_test(session, name)
343343

344-
# Maunally added samples tests helper function.
345-
# TODO(https://github.com/googleapis/google-cloud-python/issues/14417): remove tests after samples are migrated to https://github.com/GoogleCloudPlatform/python-docs-samples
346-
def _run_samples_test(session, name):
347-
samples_path = os.path.join("samples", name)
348-
samples_requirements_path = os.path.join("samples", name, "requirements.txt")
349-
test_requirements_path = os.path.join("samples", name, "requirements-test.txt")
344+
# Maunally added samples tests helper function.
345+
# TODO(https://github.com/googleapis/google-cloud-python/issues/14417): remove tests after samples are migrated to https://github.com/GoogleCloudPlatform/python-docs-samples
346+
def _run_samples_test(session, name):
347+
samples_path = os.path.join("samples", name)
348+
samples_requirements_path = os.path.join("samples", name, "requirements.txt")
349+
test_requirements_path = os.path.join("samples", name, "requirements-test.txt")
350350

351-
# Install dependencies.
352-
if os.path.exists(samples_requirements_path):
353-
session.install("-r", samples_requirements_path)
351+
# Install dependencies.
352+
if os.path.exists(samples_requirements_path):
353+
session.install("-r", samples_requirements_path)
354354

355-
if os.path.exists(test_requirements_path):
356-
session.install("-r", test_requirements_path)
355+
if os.path.exists(test_requirements_path):
356+
session.install("-r", test_requirements_path)
357357

358-
session.run(
359-
"pytest",
360-
f"--junitxml=system_{session.python}_sponge_log.xml",
361-
*session.posargs,
362-
samples_path,
363-
)
358+
session.run(
359+
"pytest",
360+
f"--junitxml=system_{session.python}_sponge_log.xml",
361+
*session.posargs,
362+
samples_path,
363+
)
364364

365365

366366
@nox.session(python=DEFAULT_PYTHON_VERSION)

scripts/client-post-processing/bigquery-storage-integration.yaml

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -91,26 +91,26 @@ replacements:
9191
for name in samples_tests:
9292
_run_samples_test(session, name)
9393
94-
# Maunally added samples tests helper function.
95-
# TODO(https://github.com/googleapis/google-cloud-python/issues/14417): remove tests after samples are migrated to https://github.com/GoogleCloudPlatform/python-docs-samples
96-
def _run_samples_test(session, name):
97-
samples_path = os.path.join("samples", name)
98-
samples_requirements_path = os.path.join("samples", name, "requirements.txt")
99-
test_requirements_path = os.path.join("samples", name, "requirements-test.txt")
94+
# Maunally added samples tests helper function.
95+
# TODO(https://github.com/googleapis/google-cloud-python/issues/14417): remove tests after samples are migrated to https://github.com/GoogleCloudPlatform/python-docs-samples
96+
def _run_samples_test(session, name):
97+
samples_path = os.path.join("samples", name)
98+
samples_requirements_path = os.path.join("samples", name, "requirements.txt")
99+
test_requirements_path = os.path.join("samples", name, "requirements-test.txt")
100100
101-
# Install dependencies.
102-
if os.path.exists(samples_requirements_path):
103-
session.install("-r", samples_requirements_path)
101+
# Install dependencies.
102+
if os.path.exists(samples_requirements_path):
103+
session.install("-r", samples_requirements_path)
104104
105-
if os.path.exists(test_requirements_path):
106-
session.install("-r", test_requirements_path)
105+
if os.path.exists(test_requirements_path):
106+
session.install("-r", test_requirements_path)
107107
108-
session.run(
109-
"pytest",
110-
f"--junitxml=system_{session.python}_sponge_log.xml",
111-
*session.posargs,
112-
samples_path,
113-
)\n\n
108+
session.run(
109+
"pytest",
110+
f"--junitxml=system_{session.python}_sponge_log.xml",
111+
*session.posargs,
112+
samples_path,
113+
)\n\n
114114
@nox.session(python=DEFAULT_PYTHON_VERSION)
115115
count: 1
116116
- paths: [

0 commit comments

Comments
 (0)