You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
1.1 KiB
41 lines
1.1 KiB
#!/usr/bin/env python3
|
|
# -*- coding: utf-8 -*-
|
|
# This file is under GNU Affero General Public License 3.0
|
|
# see LICENSE.txt
|
|
import pytest
|
|
from synth_shed import *
|
|
import synth_shed
|
|
|
|
def test_synth_shed_init():
|
|
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"
|
|
|