mirror of
https://github.com/onyx-and-iris/vban-cmd-python.git
synced 2026-04-18 04:53:31 +00:00
major version bump due to dependency change.
now packaged with poetry. added to pypi. major version bump due to dependency change. interface reworked to match the remote-api interface. readme updated with changes to installation pre-commit hook temporarily removed
This commit is contained in:
@@ -1,30 +1,32 @@
|
||||
from dataclasses import dataclass
|
||||
import vbancmd
|
||||
from vbancmd import kinds
|
||||
import random
|
||||
import sys
|
||||
from dataclasses import dataclass
|
||||
|
||||
import vban_cmd
|
||||
from vban_cmd.kinds import KindId, kinds_all
|
||||
from vban_cmd.kinds import request_kind_map as kindmap
|
||||
|
||||
# let's keep things random
|
||||
kind_id = random.choice(tuple(kind.id for kind in kinds.all))
|
||||
kind_id = random.choice(tuple(kind_id.name.lower() for kind_id in KindId))
|
||||
|
||||
opts = {
|
||||
"ip": "codey.local",
|
||||
"streamname": "codey",
|
||||
"ip": "ws.local",
|
||||
"streamname": "workstation",
|
||||
"port": 6990,
|
||||
"bps": 0,
|
||||
"sync": True,
|
||||
}
|
||||
|
||||
vbans = {kind.id: vbancmd.connect(kind_id, **opts) for kind in kinds.all}
|
||||
vbans = {kind.name: vban_cmd.api(kind.name, **opts) for kind in kinds_all}
|
||||
tests = vbans[kind_id]
|
||||
kind = kinds.get(kind_id)
|
||||
kind = kindmap(kind_id)
|
||||
|
||||
|
||||
@dataclass
|
||||
class Data:
|
||||
"""bounds data to map tests to a kind"""
|
||||
|
||||
name: str = kind.id
|
||||
name: str = kind.name
|
||||
phys_in: int = kind.ins[0] - 1
|
||||
virt_in: int = kind.ins[0] + kind.ins[1] - 1
|
||||
phys_out: int = kind.outs[0] - 1
|
||||
@@ -41,7 +43,6 @@ data = Data()
|
||||
def setup_module():
|
||||
print(f"\nRunning tests for kind [{data.name}]\n", file=sys.stdout)
|
||||
tests.login()
|
||||
tests.apply_profile("blank")
|
||||
|
||||
|
||||
def teardown_module():
|
||||
|
||||
Reference in New Issue
Block a user