mirror of
https://github.com/onyx-and-iris/xair-api-python.git
synced 2026-04-18 13:33:31 +00:00
add py13 to tox envlist
test_xair and test_x32 now run tests with tox upd Tests section in README
This commit is contained in:
20
scripts.py
20
scripts.py
@@ -1,31 +1,35 @@
|
||||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
def ex_obs():
|
||||
subprocess.run(["tox", "r", "-e", "obs"])
|
||||
subprocess.run(['tox', 'r', '-e', 'obs'])
|
||||
|
||||
|
||||
def ex_sends():
|
||||
path = Path.cwd() / "examples" / "sends" / "."
|
||||
path = Path.cwd() / 'examples' / 'sends' / '.'
|
||||
subprocess.run([sys.executable, str(path)])
|
||||
|
||||
|
||||
def ex_headamp():
|
||||
path = Path.cwd() / "examples" / "headamp" / "."
|
||||
path = Path.cwd() / 'examples' / 'headamp' / '.'
|
||||
subprocess.run([sys.executable, str(path)])
|
||||
|
||||
|
||||
def test_xair():
|
||||
path = Path.cwd() / "tests" / "xair"
|
||||
subprocess.run(["pytest", "-v", str(path)])
|
||||
subprocess.run(['tox'], env=os.environ.copy() | {'TEST_MODULE': 'xair'})
|
||||
|
||||
|
||||
def test_x32():
|
||||
path = Path.cwd() / "tests" / "x32"
|
||||
subprocess.run(["pytest", "-v", str(path)])
|
||||
path = Path.cwd() / 'tools' / 'x32.exe'
|
||||
proc = subprocess.Popen([str(path), '-i', 'x32.local'])
|
||||
subprocess.run(['tox'], env=os.environ.copy() | {'TEST_MODULE': 'x32'})
|
||||
proc.terminate()
|
||||
|
||||
|
||||
def test_all():
|
||||
subprocess.run(["tox"])
|
||||
steps = [test_xair, test_x32]
|
||||
for step in steps:
|
||||
step()
|
||||
|
||||
Reference in New Issue
Block a user