voicemeeter-api-python/scripts.py
2025-01-16 14:51:20 +00:00

58 lines
1.2 KiB
Python

import os
import subprocess
import sys
from pathlib import Path
def ex_dsl():
subprocess.run(['tox', 'r', '-e', 'dsl'])
def ex_callbacks():
scriptpath = Path.cwd() / 'examples' / 'callbacks' / '.'
subprocess.run([sys.executable, str(scriptpath)])
def ex_gui():
scriptpath = Path.cwd() / 'examples' / 'gui' / '.'
subprocess.run([sys.executable, str(scriptpath)])
def ex_levels():
scriptpath = Path.cwd() / 'examples' / 'levels' / '.'
subprocess.run([sys.executable, str(scriptpath)])
def ex_midi():
scriptpath = Path.cwd() / 'examples' / 'midi' / '.'
subprocess.run([sys.executable, str(scriptpath)])
def ex_obs():
subprocess.run(['tox', 'r', '-e', 'obs'])
def ex_observer():
scriptpath = Path.cwd() / 'examples' / 'observer' / '.'
subprocess.run([sys.executable, str(scriptpath)])
def test_basic():
os.environ['KIND'] = 'basic'
subprocess.run(['tox'])
def test_banana():
os.environ['KIND'] = 'banana'
subprocess.run(['tox'])
def test_potato():
os.environ['KIND'] = 'potato'
subprocess.run(['tox'])
def test_all():
steps = [test_basic, test_banana, test_potato]
[step() for step in steps]