Browse Source

more synth_shed_tests

master
heck 5 years ago
parent
commit
7da7a476ce
  1. 38
      examples/ext/synth_shed/tests/test_synth_shed.py

38
examples/ext/synth_shed/tests/test_synth_shed.py

@ -2,8 +2,40 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# This file is under GNU Affero General Public License 3.0 # This file is under GNU Affero General Public License 3.0
# see LICENSE.txt # see LICENSE.txt
import pytest
from synth_shed import *
import synth_shed import synth_shed
def test_synth_shed(): def test_synth_shed_init():
synth_shed init_synth_shed()
# @pytest.mark.skip(reason="")
def test_Fds() :
brand = "Korg"
model = "MS20"
osc_count = 2
s = synth_create(brand,model,osc_count)
print("brand:", s.brand)
print("model:", s.model)
print("osc_count", s.osc_count)
print("technolgy:",s.technolgy)
print("filter.tech:",s.filter.technology)
print("filter.type:",s.filter.type)
assert s.brand == brand
assert s.model == model
assert s.osc_count == osc_count
assert s.technolgy == synth_shed._tech.ANALOG
assert s.filter.technology == synth_shed._tech.ANALOG
assert s.filter.type == synth_shed._filtertype.LPF
print(play_synth(s))
def test_tech_to_string():
str = tech_to_string(synth_shed._tech.ANALOG)
print(str)
assert str == "ANALOG"
str = tech_to_string(synth_shed._tech.DIGITAL)
print(str)
assert str == "DIGITAL"

Loading…
Cancel
Save