2023-08-10 16:27:49 +01:00
|
|
|
import os
|
2022-11-07 20:21:50 +00:00
|
|
|
import subprocess
|
2023-07-04 19:52:24 +01:00
|
|
|
import sys
|
2022-11-07 20:21:50 +00:00
|
|
|
from pathlib import Path
|
|
|
|
|
|
|
|
|
|
|
|
def ex_dsl():
|
2025-01-16 14:51:20 +00:00
|
|
|
subprocess.run(['tox', 'r', '-e', 'dsl'])
|
2022-11-07 20:21:50 +00:00
|
|
|
|
|
|
|
|
2025-01-16 14:51:20 +00:00
|
|
|
def ex_callbacks():
|
|
|
|
scriptpath = Path.cwd() / 'examples' / 'callbacks' / '.'
|
2023-07-04 19:52:24 +01:00
|
|
|
subprocess.run([sys.executable, str(scriptpath)])
|
2023-06-23 18:18:01 +01:00
|
|
|
|
|
|
|
|
2023-06-24 23:30:35 +01:00
|
|
|
def ex_gui():
|
2025-01-16 14:51:20 +00:00
|
|
|
scriptpath = Path.cwd() / 'examples' / 'gui' / '.'
|
2023-07-04 19:52:24 +01:00
|
|
|
subprocess.run([sys.executable, str(scriptpath)])
|
2023-06-24 23:30:35 +01:00
|
|
|
|
|
|
|
|
2023-06-23 18:18:01 +01:00
|
|
|
def ex_levels():
|
2025-01-16 14:51:20 +00:00
|
|
|
scriptpath = Path.cwd() / 'examples' / 'levels' / '.'
|
2023-07-04 19:52:24 +01:00
|
|
|
subprocess.run([sys.executable, str(scriptpath)])
|
2023-06-23 18:18:01 +01:00
|
|
|
|
|
|
|
|
2022-11-07 20:21:50 +00:00
|
|
|
def ex_midi():
|
2025-01-16 14:51:20 +00:00
|
|
|
scriptpath = Path.cwd() / 'examples' / 'midi' / '.'
|
2023-07-04 19:52:24 +01:00
|
|
|
subprocess.run([sys.executable, str(scriptpath)])
|
2022-11-07 20:21:50 +00:00
|
|
|
|
|
|
|
|
|
|
|
def ex_obs():
|
2025-01-16 14:51:20 +00:00
|
|
|
subprocess.run(['tox', 'r', '-e', 'obs'])
|
2022-11-07 20:21:50 +00:00
|
|
|
|
|
|
|
|
|
|
|
def ex_observer():
|
2025-01-16 14:51:20 +00:00
|
|
|
scriptpath = Path.cwd() / 'examples' / 'observer' / '.'
|
2023-07-04 19:52:24 +01:00
|
|
|
subprocess.run([sys.executable, str(scriptpath)])
|
2023-06-19 20:03:26 +01:00
|
|
|
|
|
|
|
|
2023-08-10 16:27:49 +01:00
|
|
|
def test_basic():
|
2025-01-16 14:51:20 +00:00
|
|
|
os.environ['KIND'] = 'basic'
|
|
|
|
subprocess.run(['tox'])
|
2023-08-10 16:27:49 +01:00
|
|
|
|
|
|
|
|
|
|
|
def test_banana():
|
2025-01-16 14:51:20 +00:00
|
|
|
os.environ['KIND'] = 'banana'
|
|
|
|
subprocess.run(['tox'])
|
2023-08-10 16:27:49 +01:00
|
|
|
|
|
|
|
|
|
|
|
def test_potato():
|
2025-01-16 14:51:20 +00:00
|
|
|
os.environ['KIND'] = 'potato'
|
|
|
|
subprocess.run(['tox'])
|
2023-08-10 16:27:49 +01:00
|
|
|
|
|
|
|
|
|
|
|
def test_all():
|
|
|
|
steps = [test_basic, test_banana, test_potato]
|
|
|
|
[step() for step in steps]
|