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

Example testing improvements #2487

Merged
merged 7 commits into from
Aug 8, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
Prev Previous commit
Next Next commit
Fix imports
  • Loading branch information
juliocc committed Aug 8, 2024
commit a2d30df048fe909d147d3e369aed2cea02c55bae
5 changes: 3 additions & 2 deletions tests/examples/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,14 @@
# limitations under the License.
"""Pytest configuration for testing code examples."""

import collections
from pathlib import Path

from .utils import get_tftest_directive, Example, File

import marko
import pytest

from .utils import Example, File, get_tftest_directive

FABRIC_ROOT = Path(__file__).parents[2]


Expand Down
5 changes: 3 additions & 2 deletions tests/examples/test_plan.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,13 @@
# limitations under the License.

import re
import subprocess
import yaml
import shutil
import subprocess
import tempfile
from pathlib import Path

import yaml

BASE_PATH = Path(__file__).parent


Expand Down
5 changes: 3 additions & 2 deletions tests/examples_e2e/conftest.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2023 Google LLC
# Copyright 2024 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -13,7 +13,8 @@
# limitations under the License.
"""Pytest configuration for testing code examples."""

from ..examples.conftest import pytest_generate_tests as _examples_generate_test
from ..examples.conftest import \
pytest_generate_tests as _examples_generate_test


def pytest_generate_tests(metafunc):
Expand Down
1 change: 1 addition & 0 deletions tests/examples_e2e/test_plan.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
# limitations under the License.

from pathlib import Path

from ..examples.test_plan import prepare_files
from ..examples.utils import get_tftest_directive

Expand Down