mirror of
https://github.com/onyx-and-iris/xair-api-python.git
synced 2026-04-18 13:33:31 +00:00
tests migrated from nose to pytest
fixes #1 config.ini added to gitignore rewording in readme, links to behringer/midas pages added. kinds supported updated. development dependencies updated in setup.py kind maps in kinds module updated kwarg port added (might revert this later) pre-commit.ps1 added for use with git hook mr18 tests badge added to readme
This commit is contained in:
@@ -1,17 +1,39 @@
|
||||
import mair
|
||||
from mair import kinds
|
||||
import threading
|
||||
from dataclasses import dataclass
|
||||
import sys
|
||||
|
||||
_kind = 'MR18'
|
||||
kind_id = "MR18"
|
||||
ip = "mixer.local"
|
||||
|
||||
mars = {kind.id_: mair.connect(_kind) for kind in kinds.all}
|
||||
tests = mars[_kind]
|
||||
tests = mair.connect(kind_id, ip=ip)
|
||||
|
||||
def setup_package():
|
||||
tests.worker = threading.Thread(target = tests.run_server)
|
||||
kind = kinds.get(kind_id)
|
||||
|
||||
|
||||
@dataclass
|
||||
class Data:
|
||||
"""bounds data to map tests to a kind"""
|
||||
|
||||
name: str = kind.id_
|
||||
dca: int = kind.num_dca - 1
|
||||
strip: int = kind.num_strip - 1
|
||||
bus: int = kind.num_bus - 1
|
||||
fx: int = kind.num_fx - 1
|
||||
rtn: int = kind.num_rtn - 1
|
||||
|
||||
|
||||
data = Data()
|
||||
|
||||
|
||||
def setup_module():
|
||||
print(f"\nRunning tests for kind [{data.name}]\n", file=sys.stdout)
|
||||
tests.worker = threading.Thread(target=tests.run_server)
|
||||
tests.worker.daemon = True
|
||||
tests.worker.start()
|
||||
tests.validate_connection()
|
||||
|
||||
def teardown_package():
|
||||
|
||||
def teardown_module():
|
||||
tests.server.shutdown()
|
||||
|
||||
Reference in New Issue
Block a user