File: test_examples.py

package info (click to toggle)
python-upsetplot 0.9.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,188 kB
  • sloc: python: 2,772; makefile: 153; sh: 12
file content (19 lines) | stat: -rw-r--r-- 482 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import glob
import os
import subprocess
import sys

import pytest

exa_glob = os.path.join(
    os.path.dirname(os.path.abspath(__file__)), "..", "..", "examples", "*.py"
)


@pytest.mark.parametrize("path", glob.glob(exa_glob))
def test_example(path):
    pytest.importorskip("sklearn")
    pytest.importorskip("seaborn")
    env = os.environ.copy()
    env["PYTHONPATH"] = os.getcwd() + ":" + env.get("PYTHONPATH", "")
    subprocess.check_output([sys.executable, path], env=env)