mirror of
https://github.com/onyx-and-iris/vban-cmd-python.git
synced 2025-01-29 14:30:48 +00:00
rename test poe scripts
add passenv = * to [testenv]
This commit is contained in:
parent
1742ff839e
commit
c9c365ac54
@ -30,10 +30,10 @@ build-backend = "poetry.core.masonry.api"
|
||||
gui.script = "scripts:ex_gui"
|
||||
obs.script = "scripts:ex_obs"
|
||||
observer.script = "scripts:ex_observer"
|
||||
basic.script = "scripts:test_basic"
|
||||
banana.script = "scripts:test_banana"
|
||||
potato.script = "scripts:test_potato"
|
||||
all.script = "scripts:test_all"
|
||||
test_basic.script = "scripts:test_basic"
|
||||
test_banana.script = "scripts:test_banana"
|
||||
test_potato.script = "scripts:test_potato"
|
||||
test_all.script = "scripts:test_all"
|
||||
|
||||
[tool.tox]
|
||||
legacy_tox_ini = """
|
||||
@ -41,6 +41,7 @@ legacy_tox_ini = """
|
||||
envlist = py310,py311,py312
|
||||
|
||||
[testenv]
|
||||
passenv = *
|
||||
setenv = VIRTUALENV_DISCOVERY=pyenv
|
||||
allowlist_externals = poetry
|
||||
commands =
|
||||
|
@ -19,18 +19,15 @@ def ex_observer():
|
||||
|
||||
|
||||
def test_basic():
|
||||
os.environ['KIND'] = 'basic'
|
||||
subprocess.run(['tox'])
|
||||
subprocess.run(['tox'], env=os.environ.copy() | {'KIND': 'basic'})
|
||||
|
||||
|
||||
def test_banana():
|
||||
os.environ['KIND'] = 'banana'
|
||||
subprocess.run(['tox'])
|
||||
subprocess.run(['tox'], env=os.environ.copy() | {'KIND': 'banana'})
|
||||
|
||||
|
||||
def test_potato():
|
||||
os.environ['KIND'] = 'potato'
|
||||
subprocess.run(['tox'])
|
||||
subprocess.run(['tox'], env=os.environ.copy() | {'KIND': 'potato'})
|
||||
|
||||
|
||||
def test_all():
|
||||
|
@ -7,16 +7,13 @@ import vban_cmd
|
||||
from vban_cmd.kinds import KindId
|
||||
from vban_cmd.kinds import request_kind_map as kindmap
|
||||
|
||||
# get KIND_ID from env var, otherwise set to random
|
||||
KIND_ID = os.environ.get(
|
||||
'KIND', random.choice(tuple(kind_id.name.lower() for kind_id in KindId))
|
||||
)
|
||||
# get KIND from environment, if not set default to potato
|
||||
KIND_ID = os.environ.get('KIND', 'potato')
|
||||
|
||||
opts = {
|
||||
'ip': 'localhost',
|
||||
'streamname': 'onyx',
|
||||
'port': 6980,
|
||||
'bps': 0,
|
||||
}
|
||||
|
||||
vban = vban_cmd.api(KIND_ID, **opts)
|
||||
|
Loading…
Reference in New Issue
Block a user