Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
6 changes: 3 additions & 3 deletions examples/design_system/templates/page.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% include "components/button.html" %}
{% include "components/card.html" %}
{% include "components/alert.html" %}
{% from "components/button.html" import button %}
{% from "components/card.html" import card %}
{% from "components/alert.html" import alert %}

<h1>{{ title }}</h1>

Expand Down
11 changes: 8 additions & 3 deletions tests/test_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
SMOKE_EXAMPLES = [
"content_stacks",
"coverage",
"design_system",
"extensions",
"sandbox",
"terminal_basic",
Expand All @@ -35,9 +36,13 @@


def _load_example(name: str):
"""Import an example's run module by path."""
run_path = EXAMPLES_DIR / name / "run.py"
spec = importlib.util.spec_from_file_location(f"examples.{name}.run", run_path)
"""Import an example's run or app module by path."""
module_path = EXAMPLES_DIR / name / "run.py"
if not module_path.exists():
module_path = EXAMPLES_DIR / name / "app.py"
spec = importlib.util.spec_from_file_location(
f"examples.{name}.{module_path.stem}", module_path
)
mod = importlib.util.module_from_spec(spec)
Comment on lines +40 to 46
# Temporarily add src/ to path so `import kida` resolves
src = str(EXAMPLES_DIR.parent / "src")
Expand Down
Loading