Skip to content

Commit

Permalink
Fix example test filters
Browse files Browse the repository at this point in the history
Signed-off-by: Travis F. Collins <[email protected]>
  • Loading branch information
tfcollins committed May 14, 2024
1 parent ba16a44 commit 5c18901
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions tests/test_examples.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
# flake8: noqa
import os
import pathlib
import runpy

import pytest

ignore = ["daq2_rx_dt_example.py", "hmc7044_example.ipynb"]

examples_in_dir = pathlib.Path(__file__).parent.parent / "examples"
examples = [str(p) for p in examples_in_dir.glob("*.py")]
examples = [e for e in examples for i in ignore if i not in e]
examples_dir = os.path.join(pathlib.Path(__file__).parent.parent, "examples")
examples_dir = pathlib.Path(examples_dir)
examples = [str(p) for p in examples_dir.glob("*.py")]
filenames = [os.path.basename(i) for i in examples]
filenames = [i for i in filenames if i not in ignore]
examples = [os.path.join(examples_dir, i) for i in filenames]


@pytest.mark.parametrize("script", examples)
Expand Down

0 comments on commit 5c18901

Please sign in to comment.