Skip to content

Commit

Permalink
Add test of tutorials
Browse files Browse the repository at this point in the history
  • Loading branch information
dalonsoa committed Jan 10, 2024
1 parent bb247d6 commit 6db4d6a
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tests/test_tutorials.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
from pathlib import Path
from typing import List

from pytest import mark


def available_tutorials() -> List[Path]:
"""Locate the available tutorials in the docs."""
base_path = Path(__file__).parent.parent / "docs" / "demo"
return [p for p in base_path.rglob("*.py")]


@mark.parametrize("tutorial", available_tutorials())
def test_tutorials(tutorial):
import subprocess

subprocess.run(["python", tutorial]).check_returncode()

0 comments on commit 6db4d6a

Please sign in to comment.